FluxEngine
FluxEngine

Reputation: 13310

Pulling from a remote branch to a local branch

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.

Upvotes: 1

Views: 275

Answers (1)

Kovge
Kovge

Reputation: 2019

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

Upvotes: 3

Related Questions