Sauter Git Workflow : Make the final release for a version - sauter-hq/git-guidelines GitHub Wiki

When the Quality Assurance tested everything and gave the approval to release the product on the market, simply do the following :

  • Checkout the master branch

Then continue with :

SourceTree

  • Check that there are no new commits since the last version tagged:
    final release should have been tested by the Quality Assurance

    • You can check it on the master branch by selecting "Current Branch" in the listbox and verifying that the very last version published is on the top level.

      No Commits On Master

    • If that is not the case, you can look at Remove inadvertently pushed commits to fix the situation.

  • Checkout the release branch (e.g The release v3.2)

  • Click on the Git Flow button.

  • Choose the Git Flow action : Finish Release

    Finish the final release

  • Let everything as default but type in a message for the final tag ( e.g. 3.2 final)

    Give the final release a name

  • This will end up with :

    • The release branch changes are merged into master
    • A tag named like the release branch
  • If everything is as you wanted, simply push the tags and the master branch Push the tags and the master branch to finish the release

Command Line

  • Check that there are no new commits since the last version tagged:
    final release should have been tested by the Quality Assurance

    • You can check it on the master branch by verifying that the very last version published is on the top level. When you run :
    gitk master
    

    No Commits On Master

    • Alternatively you can also let the command-line check it for you by running :
    if [ `git rev-list --max-count=1 v3.2` != `git rev-list --max-count=1 HEAD` ]; then   \
      echo "ERROR: The last version of master isn't the laster version tagged";           \
    fi
    
  • Checkout the release branch (e.g The release v3.2)

  • Finish the release with git flow, which will merge the release branch in master, tag the final release and bring back the changes in develop too (in case there were fix specific for the release).

    git flow release finish v3.2
    
    Switched to branch 'master'
    Your branch is up-to-date with 'origin/master'.
    Deleted branch release/v3.2 (was 145694c).
    
    Summary of actions:
    - Latest objects have been fetched from 'origin'
    - Release branch has been merged into 'master'
    - The release was tagged 'v3.2'
    - Release branch has been back-merged into 'develop'
    - Release branch 'release/v3.2' has been deleted
    
  • A message to the final tag will be asked, type in a message to describe the final release ( e.g. 3.2 final)

  • This will end up with :

    • The release branch changes are merged into master
    • A tag named like the release branch
  • If everything is as you wanted, simply push the tags and the master branch

    git push --tags
    git push --all