Bug: git amend in the middle of a stack results in detached HEAD
Bug: git amend in the middle of a stack results in detached HEAD: a task in LegoFlow-SWE (Harbor dataset). When using git amend while checked out at a commit that has descendant commits (i.e., a commit in the middle of a stack), the amend operation completes successfully but leaves the repository…
The task
When using `git amend` while checked out at a commit that has descendant commits (i.e., a commit in the middle of a stack), the amend operation completes successfully but leaves the repository in a **detached HEAD** state rather than keeping the current branch checked out.
Part of Lego-X/LegoFlow-SWE.