Answer the question
In order to leave comments, you need to log in
How do tags work in Git?
Some time ago I downloaded the repository to my local computer. After that, others continued to develop it, adding new commits to the develop and master branches. Also added tags (3.1-beta, 4.0-beta) to some commits in the develop branch.
I need to convert the code in the current project folder to version 4.0-beta, for this I execute in its local folder:
git fetch
git checkout 4.0-beta
git status
HEAD detached at с
nothing to commit, working directory clean
Answer the question
In order to leave comments, you need to log in
Yes, everything is correct in general terms. In addition to the point about git merge
.
Head Detached because you checked out a specific commit, not a branch. Accordingly, you are not "located" in any branch. What the git tells you. You can do it git checkout -b my-new-branch
and then this message disappears because you will create a new branch on the current commit and switch to it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question