I mistakely applied the branch on top of my master branch and committed the change. But now I want to make my HEAD point to the origin/master.
I have tried the below command :
git reset --hard origin/master
But my log shows the HEAD is pointed to master, origin/master, origin/HEAD, change-branch, etc.
How can I make my HEAD point only to (HEAD -> master, origin/master, origin/HEAD) not to change-ID like below?
Expected log :
Any help would be appreciated.
From your screenshot : it so happens that, at the moment, your two local branches change-494895-1
and 494895-1
point to the very same commit as master
and origin/master
.
They won't interfere in any way with your work on master
or on the rest of the repo. For example : next time you make a commit on master
, or pull an update from origin/master
, master
will move forward, and these two branches won't.
If you need to do something with those two branches :
git branch -d <branch_name>
git checkout <brnach_name>; #some work; git commit