"git push" and "git push --tags" in the same command? "git push" and "git push --tags" in the same command? git git

"git push" and "git push --tags" in the same command?


The closest option may be:

git push --follow-tags

Push all the refs that would be pushed without this option, and also push annotated tags in refs/tags that are missing from the remote but are pointing at committish that are reachable from the refs being pushed.


According to the documentation of --tags you can specify additional refspecs to be pushed.

So you can simply use

git push --tags origin HEAD


You can create alias to have a fast access to this command:

git config --global alias.p '!git push && git push --tags'

or

git config --global alias.pa '!git push --all && git push --tags'

now you can do it like this:

git tag v4.7git p

You can read more about aliases here