This blog is for my software problem solving and technology knowledge sharing.
Friday, November 27, 2015
Abandon git local branch
I've merged, I've commited changes locally, but I have not decided to push it or not, so I leave it there. After several days, I want to totally abandon my local branch.
I would do below:
git checkout master It will just tell you that your local branch is different from remote.
git reset --hard origin/master This is the real effect command, it will force your local to be exactly same as remote.
No comments:
Post a Comment