I am working on a local branch, and a team member has made made some changes to that branch. How do I "pull/fetch" their changes, to my local branch?
I do not want to pull the entire repo, just this branch.
Before this checkout the branch what your colleagues use
git checkout [branch]
If all of you use master branch, skip this step.
And pull only one branch (and merge vith your local branch) Use this:
git pull [repo] [branch]
For example:
git pull origin master
If you want only download the changes and after want to merge:
git fetch [repo] [branch]
git merge [repo]/[branch]
for example:
git fetch origin master
git merge origin/master #the local copy of the master branch in origin repo
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.