0

I've made changes on my local branch, and done "git push origin my_branch_name". When I checkout to master branch, and do git pull, does it pull changes from all remote branches to my master branch?

  • 1
    No, it pulls changes to the master branch from upstream, not from any other branch at all. – Lasse V. Karlsen Apr 10 '18 at 09:53
  • So, how can I see changes from others branches? @LasseVågsætherKarlsen – Marija Bexing Apr 10 '18 at 10:01
  • 1
    `git fetch` – Read the [Git Book](https://git-scm.com/book/en/v2) please. – poke Apr 10 '18 at 10:15
  • Possible duplicate of [How to fetch all git branches?](https://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches) – phd Apr 10 '18 at 11:38
  • You merge in those other branches if you want them to be included in the master branch, otherwise you might want to just check out the other branches? It is a bit hard to provide good advice because I don't know what you mean by "see the changes". – Lasse V. Karlsen Apr 10 '18 at 12:26
  • @LasseVågsætherKarlsen I mean get changes to my local repo? What happens when I check out the others bronches? – Marija Bexing Apr 10 '18 at 12:45

1 Answers1

1

When you do git pull it only pulls the changes for the branch you are currently on.

Kruspe
  • 126
  • 8