Merging Branches into Master

So a lot of times in my group projects I make a branch from the origin/master and make a million commit to it and usually, nobody updates the master whilst I’m working on my own branch. This results in my branch being ahead of master by 17 commits and nothing new in master.

This is a note to future-self about how to effectively just merge my branch into master so that my branch is master.


(on development branch) git merge master

git checkout master

(on master branch) git merge development

And… if you are like me with a bunch of commits ahead of master a lot of fast-forwarding will take place.

Screen Shot 2017-03-20 at 12.17.55 AM.png

The wonderful thing about nobody else updating the code: no merge conflicts. If you have merge conflicts then fix them obviously, but try to make sure it’s someone else’s problem by pushing first.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s