Skip to content

Instantly share code, notes, and snippets.

@metatoaster
Last active September 21, 2016 03:14
Show Gist options
  • Select an option

  • Save metatoaster/d83665eb0656bc4fbece9918e57b27ea to your computer and use it in GitHub Desktop.

Select an option

Save metatoaster/d83665eb0656bc4fbece9918e57b27ea to your computer and use it in GitHub Desktop.
Git Rebase Release

Typically workflow is like this for a release

$ git checkout master -b 0.1.x  # or whatever version number

Things get done, version number get set up.

$ git commit -m package-0.1.0
$ git tag 0.1.0

The master branch should stay in sync - and if everything there should be moved to the next patch release

$ git checkout master -b rebase
$ git rebase -i 0.1.x  # drop commits that are not needed
$ git checkout 0.1.x
$ git reset --hard rebase
$ git branch -d rebase

All the above sbould complete without errors. Now bump the version.

$ git commit -m package-0.1.1
$ git tag 0.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment