Skip to content

Instantly share code, notes, and snippets.

@hofnerb
Last active June 26, 2019 21:49
Show Gist options
  • Save hofnerb/68d14f71aef8d01634d9 to your computer and use it in GitHub Desktop.
Save hofnerb/68d14f71aef8d01634d9 to your computer and use it in GitHub Desktop.

Create and push tags

By adding tags and pushing these to github, one can create release versions (aka builts) with Travis-CI that are part of the repository.

I do this for example for my RR Guideline repository.

To make a release do the following:

  1. Make changes and commit these:
git commit -a
  1. Add a tag (to the previous commit):
git tag -a [tagname] -m '[annotation]'

The first option -a creates a tag with the name [tagname], while the second option adds an annotation.

  1. To review the tags simply use:
git tag

and to show the tagged version use

git show [tagname]
  1. Push the tag to the remote repository:
git push origin [tagname]
git push

or

git push origin --tags

Source: https://git-scm.com/book/en/v2/Git-Basics-Tagging

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