Git tag: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 39: Line 39:


  git push origin --tags
  git push origin --tags
=Remove a Tag=
==Remove a Tag Locally==
==Remove a Tag Remotely==

Revision as of 12:28, 22 December 2018

External

Internal

Overview

Create, list, delete or verify a tag object. To check out the commit associated with a specific tag into a detached HEAD, see git checkout.

By default, tags are not pushed to remote server. For more details see [[]] below.

List Tags

Tags can be listed based on a given pattern. All tags are listed if no pattern is given.

git tag [-l] [name-pattern]
git tag
git tag -l

Create a Tag

git tag '<tag-name>'

Pushing a Tag to a Remote Server

By default, the git push command doesn’t transfer tags to remote servers. You will have to explicitly push tags to a shared server after you have created them. This process is just like sharing remote branches  - you can run git push origin <tagname>:

git push origin <tagname>
git push origin release-1.2.1

Pushing All Tags

git push origin --tags

Remove a Tag

Remove a Tag Locally

Remove a Tag Remotely