I accidentally pushed the empty commit into Github When I do
git log
I cam see 3 commits including empty commit
Commit 3 : XXXX
Commit 2[Empty commit]: XXXXX
Commit 1 : XXXX
When I do
git rebase -i HEAD~3
I am getting:
fatal: Needed a single revision
invalid upstream 'head~3'
Which means its not showing empty commit
When I do:
git rebase -i HEAD~2
I am getting: Commit 1 and Commit 3
Empty commit is not shown while doing rebase
I tried cherry-pick rebase --keep empty
How can I squash/fixup the empty commit[Commit 2 in the example] using rebase ?