I have two branches on my local, i.e. master and foo. I recently took a pull from origin and updated my master branch. Now I want to merge those changes into the branch foo and then commit and push those changes in that branch itself?
How to do I do that?
I can't seem to wrap my head around the merge command.
It should be as simple as:
git checkout foo git merge master
But that will merge all commits since
foo started from
master (or at least since
master was last merged into
(new commits after git pull) vvvv x--x--x--x--X--X (master, origin/master) \ f--f--f (foo)
(ALL those commits are merged in foo: x as well as X) vvvvvvvvvv x--x--x--x--X--X (master, origin/master) \ \ f--f--f -----M (foo)