Question
Stuck in a git rebase ... how to reset
I am part way through a git rebase and I am stuck. I can't remember exactly what happened but I was using a UI and deleted a checked-out branch and things just seemed to go blank. I restarted and managed to do a bit of other work creating and committing to other branches etc but then I noticed a status saying I was still in the middle of a rebase
If I try
git rebase --skip
git rebase --continue
git rebase --abort
each fail with
error: could not read '.git/rebase-merge/head-name': No such file or directory
Is there a way I can get back to a stable state? I'm really not bothered about what the rebase related to so am not trying to get back to point where I am still in the middle of the rebase.
Edit:
$ git status
On branch fix/SJW-01225
Your branch is up to date with 'core-v3/fix/SJW-01225'.
You are currently rebasing.
(all conflicts fixed: run "git rebase --continue")
Untracked files:
(use "git add <file>..." to include in what will be committed)
[long list of untracked files]
nothing added to commit but untracked files present (use "git add" to track)
Edit-1:
$ touch .git/rebase-merge/head-name
$ git rebase --abort
error: could not read '.git/rebase-merge/onto': No such file or directory
$ touch .git/rebase-merge/onto
$ git rebase --abort
error: could not get 'onto': ''
Thx