I have 2 branches (master and dev). Another worker has pushed a new branch called stage into the repository so that stage is now 1 commit ahead of master. I am trying to pull down stage so that I can merge it into master (and thus merge into dev), but I am having issues pulling down stage. How do I pull down a clean version of stage?
Share
I don’t think you understand the branching basics of Git here. You may understand a bit more after reading my answer, by example.
the long story
You should fetch all updates
then you should see the now still remote branch:
Optionally, you can make this branch a local branch
stage(does not have to have the same name) by checking it outAnd you should be switched onto this branch with this.
Now back to master and merge it:
the pull magic
Now, one could combine both
fetchandmergesteps by a singlepull. However, sometimes it’s needed to fetch new branches and their heads in order to be able to specify them.