sourcegit-scm / sourcegit

Windows/macOS/Linux GUI client for GIT users
MIT License
1.36k stars 135 forks source link

SourceGit deletes git-rebase-todo, breaking interactive rebase #509

Closed DanielSWolf closed 1 month ago

DanielSWolf commented 1 month ago

It seems that SourceGit sometimes deletes the git-rebase-todo file created by Git, breaking a running interactive rebase.

Steps to reproduce:

  1. Make sure SourceGit is running in the background with a repo open
  2. Open a terminal and navigate to the repo
  3. Start an interactive rebase using something like git rebase -i @~5
  4. In the editor that opens, enter a line with b (break) between any two commits, then close the editor
  5. When Git stops at the specified position, run git rebase --continue

Expected result:

The command succeeds, finishing the interactive rebase

Actual result:

The command fails with the error message "fatal: no rebase in progress". This is because SourceGit seems to have deleted the git-rebase-todo file that tells Git that an interactive rebase is in progress. As a result, the Git repo ends up in detached HEAD state at the last commit before the break command.

System:

heartacker commented 1 month ago

same there

love-linger commented 1 month ago

Fixed. You can download the latest build from https://github.com/sourcegit-scm/sourcegit/actions/runs/11011777700

DanielSWolf commented 1 month ago

Wow, that was quick! 🤩 Thank you very much, that fixes it for me.