I am working on a branch in git. When I do
git checkout
(commit id obtained from git log ), it is getting commit
git log
By checking out to one of the commits in the history you are moving your git into so called 'detached state', which looks like is not what you want. Use this single command to create a new branch on one of the commits from the history:
git checkout -b