When i run git fetch from my local repo it will update my local code?
Answers
Answered by
2
When you fetch you get the remote branches, but you still need to merge the changes from the remote branch into your local branch to see those changes.
After fetching, try this:
git log origin/yourbranchname | head
git log yourbranchname | head
Do you see the difference?
Now do:
git checkout origin/yourbranchname -b newbranchname
git log newbranchname
You should see remote changes in the newbranchname.
You can also merge those changes into your branch with
git checkout yourbranchname
git merge origin/yourbranchname
Similar questions