I am working on a branch in git. When I do
git checkout
(commit id obtained from git log
), it is getting commit
If you are branch master
and you do a git checkout
I'm fairly certain that this causes git to load that commit in a detached state, changing you out of the current branch.
If you want to make changes you can and then you can do a git checkout -b
to create a new branch based off that commit and any changes you have made.