Push directory and tag together

Issue

The task is:
Tag the current version of the project with the tag ABC.
Push all changes to your submission repository.
And make sure to push the tag.

I got to the depository I needed.
I tagged it by:
git tag ABC

How do I push all the changes and the tag to my submission repository?

Is that command do what I want?
git push origin ABC

Solution

Git never pushes directories, always commits, branches, or tags. If you push any of those three, all ancestors ("parents") will be pushed too. So to push the tag and its referenced commit, including all parent commits, use git push origin TAGNAME, yes.

Answered By – knittl

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published