I have checked out a tag from my master branch. I made some changes and am wondering if there is a way to commit/merge those changes with the branch? Otherwise I see my only option as pulling the latest and then redoing the changes there. Any ideas?
Asked
Active
Viewed 34 times
1 Answers
0
You're now in the "detached HEAD" state. So just fork a branch off your HEAD
git checkout -b newbranch
and then decide what to do next in a convenient regular situation where you just have several branches to manipulate.
For instance, you might want to decide to merge your developments to the "master" branch, then do
git checkout master
git merge newbranch
After that you can get rid of that temporary branch using
git branch -d newbranch
P.S. Also note that tags are not on any branch. Tags refer to commits, and those commits may be referenced by more than one branch or by no branch at all.