tylorreimer
tylorreimer

Reputation: 79

How to clean up my Git history

I'm still quite new to Git but have thus far been able to figure out how to do what I want to do with some searching. I'm trying to clean up my Git history and remove a previous commit and branch called bootstrap-v4 but haven't had any luck so far. Can someone suggest how to remove the branch and extra commit and keep my master branch clean?

My current Git history

Upvotes: 1

Views: 946

Answers (1)

Ben
Ben

Reputation: 1367

Your GUI is showing you your uncommitted changes, which is the merge of bootstrap-v4 branch to master. If you do not wish to commit those changes, that is what a git reset --hard origin/master would accomplish (alas, I am not familiar with the operation of your GUI, but it should offer you some way of doing a hard reset)

As for removing the remote branch, on the command line, it would be: git push origin :bootstrap-v4

Upvotes: 2

Related Questions