Skip to content

Instantly share code, notes, and snippets.

@egbertp
Created February 10, 2016 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egbertp/edd2077b2e219ec32181 to your computer and use it in GitHub Desktop.
Save egbertp/edd2077b2e219ec32181 to your computer and use it in GitHub Desktop.
Git cheat sheet

Remove remote tag

$ git push origin :refs/tags/deploy

Create tags

Annotated tags

$ git tag -a <tagname> -m '<message>'

Lightweight tags

$ git tag -a <tagname>

Push annotated tag

$ git push --follow-tags

It pushes both commits and only tags that are both:

  • annotated
  • reachable (an ancestor) from the pushed commits

Push specific tag

$ git push origin deploy

Delete tag locally

$ git tag -d deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment