I have a clone of a branch from git repo. I made changes commited and pushed to remote branch. Now I want to update my clone to remote branch, so that changes made by anybody else should appear in my clone. How to do that ? Thanks
Asked
Active
Viewed 8,727 times
2
-
https://githowto.com/ – jonrsharpe Feb 26 '16 at 09:46
-
Use either `git pull origin branch_name` or `git pull --rebase origin branch_name`. You may get conflicts if you have made commits since you last pulled. – Tim Biegeleisen Feb 26 '16 at 09:49
-
2Also consider reading the wonderful Git Book : https://git-scm.com/book/en/v2 – luxcem Feb 26 '16 at 09:50
1 Answers
3
git pull will retrieve remote modification and merge it to your worktree.
If you only want to view remote changes,
git fetch
will retrieve remote changes to local, and you can refer it by origin/branch_name.

gzh
- 3,507
- 2
- 19
- 23