- i cloned remote repo,
git clone urlmachine a - i created branch:
git checkout -b my-new-branch - i made several commits branch
- i push server,
git push origin my-new-branch - i clone remote repo machine b
- i
git-fetch,git-fetch --all, several other tricks until branch shows up. - i switch branch,
git checkout my-branch,git log, , none of commits appear, thoughgit branchshows i'm on my-new-branch
what's going on? how can diagnose issue? version mismatch issue?
(thanks debian have old version of git: git version 1.7.10.4)
in machine b, run git branch -vv make sure local my-branch tracking remote my-new-branch
if output show [origin/master] both local branches (master , my-branch), my-branch tracking origin/master instead of origin/my-new-branch
so fix can remove local my-branch running
git branch -d my-branch then create new local my-branch track origin/my-new-branch
git checkout -b my-branch origin/my-new-branch note: above command creates local branch , check out together.
Comments
Post a Comment