↑ ↓ select, Enter open, Esc close

Create an annotated tag and push it to the remote

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
user@server
git tag -a v1.4.0 -m 'Release 1.4.0' && git push origin v1.4.0

Creates an annotated tag with author, date and message on the current commit and then pushes it. git push does not transfer tags by default, hence the second step. Useful for clearly marking deployed versions and returning to them later.

Note: git tag -l lists existing tags. Tags that were already pushed should not be moved, since other clones keep the old state.

Also searched as

  • git create and push tag
  • tag a release in git
  • git tag not pushed

Related one-liners

All in Git

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.