My local repo contains the following commits:
A ---- B ---- C ---- D ---- E
\
1 ---- 2
\ /
1.1
The lettered changes are on the remote repo. Changes 1, 1.1, and 2 are temporary changes in my local repo that i no longer want. These may have been automatically created when i created a stash with uncommitted changes on top of B; that stash has been deleted. I'd like to make the history less complicated, which is why i'd like to get rid of these.
I can clearly get rid of these by blowing away my local repo and cloning the remote repo again, but this seems heavy handed. And there is a local branch not in the remote repo that i want to keep.
From what i've read so far, the discussions have been on how to squash multiple commits into one. I haven't found anything on deleting commit objects. I also tried to "git prune <hash of commit 2>" and it didn't do anything.
How do i get rid of commit objects 1, 1.1, and 2?
Thanks in advance.