catalinux
catalinux

Reputation: 1452

Git - local branches , update from remote

I've setup a git environment (mo github) where I have

Now, on remote some teammate pushed on remote a feature on remote that I want on my feature branch.

Which are the right steps to do that?

Upvotes: 0

Views: 108

Answers (2)

Simson
Simson

Reputation: 3559

The concept of remote and local branches can sometimes be a little bit confusing in the beginning. If you want to keep your local branch "master" in sync with the remote branch git pull suggested in another answer here is a good way of doing so. There is also another way of keeping up with the remote branch while still working on your featureX branch without leaving the branch: merge your friends changes directly from the remote branch.

git fetch
git merge origin/master

Upvotes: 2

catalinux
catalinux

Reputation: 1452

What it worked for me

  • In the local master branch: git pull
  • in the local feature branch: git merge master

What it did not work for me:

  • git pull in the local feature branch

Note:

It would have been great that people who down-voted my question would have also answered to this question.

Upvotes: 1

Related Questions