Reputation: 2031
I want to download the code from another branch:
Switching to my branch:
git checkout mybranch
Then performs a merge of the branch where wants to download the code:
git merge another_branch
Performs download:
git pull
I get the message that everything is up to date even though it is not. What I am doing wrong?
Upvotes: 0
Views: 28
Reputation: 2733
I don't have an answer, but you can confirm your belief that repo is NOT up to date with remote.
A) Do `git remote -v` to verify remote repo config is correct.
B) Do `git describe` to see the HEAD of local repo.
C) Do `git ls-remote -h` to look at HEAD of remote.
B and C should have same SHA values. Do they have same SHA?
Upvotes: 0
Reputation: 706
I'm going to assume that the "other_branch" is another branch that is hosted on the remote repository and that you also have some history of that branch in your local repo.
Try this:
git checkout another_branch
git pull origin another_branch
git checkout mybranch
git merge another_branch
This will :
another_branch
another_branch
to your local versionanother_branch
in the local version of mybranchUpvotes: 1