Skip to content

Instantly share code, notes, and snippets.

View jakobgerstenlauer's full-sized avatar

Jakob Gerstenlauer jakobgerstenlauer

  • Stuttgart, Germany
View GitHub Profile
# Git tagging workflow
1. Show all locally existing tags:
* `$ git tag`
1. Create a new annotated tag.
* `$ git tag -a v1.4 -m "new corrected input data"
1. Share your tag with all other users of the central repository.
* `$ git push origin v1.4`
1. How you can later checkout this specific version:
* `$ git checkout v1.4`
1. If you want to modify the previous version, you must create a new branch based on the tag:

Git Feature Branch Best Practices

  1. Checkout the master branch and update it. Only allow fast-forward-merge.
    • $ git checkout master
    • $ git pull -ff-only
  2. Create a new feature branch based on the current master branch.
    • $ git checkout -b feature_branch
  3. Back-up your local feature branch.
    • $ git push --set-upstream origin feature_branch

Later it is sufficient to write: