Answer the question
In order to leave comments, you need to log in
Git - tags. To tag a commit, you first need to create it, then take the hash of the commit and apply the git tag? Or it is possible at once during commit?
Hello. Reading the Git documentation:
https://git-scm.com/book/ru/v2/%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D1%8B-Git-%D0%A0%D0%B0%D0%B1%D0%BE%D1%82%D0%B0-%D1%81-%D0%BC%D0%B5%D1%82%D0%BA%D0%B0%D0%BC%D0%B8
Now, if someone clones or git pulls from your repository, they will get your tags on top of everything else.
Answer the question
In order to leave comments, you need to log in
In the git, everything is extremely simple. tag and even branch is just a link to a commit, that is, a file for tag/branch is created on disk, which contains the hash of the commit to which it refers. Hence the conclusion, to create a tag you need a commit.
What pull/fetch seems to be is almost the same - fetch is a simple command that fetches changes from a remote repository, while pull is a compound command that internally calls fetch first, then rebase for example.
Branches and tags can be obtained by cloning a repository, but for this the tag must be pushed to this repository.
Read more here .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question