Skip to content

Instantly share code, notes, and snippets.

@pierrax
Last active June 8, 2016 07:02
Show Gist options
  • Save pierrax/8996ebcb443506160a491fb8f99bd57f to your computer and use it in GitHub Desktop.
Save pierrax/8996ebcb443506160a491fb8f99bd57f to your computer and use it in GitHub Desktop.
How to merge a release branch before deploying

#Go to the release branch

git checkout RELEASE_date

#Pull the last changes

git pull origin RELEASE_date

#Go to the master branch

git checkout master

#Squash merge the release branch

git merge --squash RELEASE_date

#Commit

git commit

It will compress all the release branch commits into ONE commit on the master branch

#Change the title of the new commit like this:

xxx_RELEASE_dd-mm-yy:

/!\ keep the colon at the end of the new commit title

#Benefits It's clearer on the master branch with only one commit but we keep the histories of what was done in this commit.

It will appear llike this on Github: ![Image of Yaktocat] (https://octodex.github.com/images/yaktocat.png)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment