I found an issue with git rebase --autostash <upstream> <branch> with an dirty worktree/index. It seems the currently active branch is moved, which is not correct. The following patches contain both a test and a fix. Ben Wijen (2): t3420: never change upstream branch rebase.c: make sure current branch isn't moved when autostashing builtin/rebase.c | 18 ++++++------------ t/t3420-rebase-autostash.sh | 13 +++++++++---- 2 files changed, 15 insertions(+), 16 deletions(-) -- 2.22.0