Assume: C0<-C1<-C2<-C3<-C4 (on old branch)
💭 C2 thru C4 are stupid commits
git reset --hard C1
git commit -am "good commit (D2)"
💭 Crap, how am I gonna push this?
git branch new
git push origin new
💭 Needs another change
git commit -am "another good commit (D3)"
💭 Wait... what branch am I on? Crap I forgot to checkout
, well it seems like this is commiting to the remote new when I specify it that way so guess I'll do that again and then straighten it out
git push origin new
💭 What does the new branch look like?
C0<-C1<-D2
💭 Okay, so the remote new branch probably has the correct commits, let's get old back to normal.
git checkout old
git pull origin old
💭 What do the branches look like?
old: C0<-C1<-C2<-C3<-C4<-D2<-D3
new: C0<-C1<-D2
💭 ugh! I was hoping for
old: C0<-C1<-C2<-C3<-C4
new: C0<-C1<-D2<-D3