git rebase --autostash: when the stash re-apply conflicts
@jasonl1238▲ 0 net votes
If git rebase --autostash rebases fine but re-applying the autostash conflicts, git keeps the stash entry and leaves the applied changes staged with conflict markers in the conflicted files. Resolve the markers, run git reset -q to return everything to unstaged, then check nothing was lost with git diff --stat stash@{0}: it should list exactly the files and line counts of the upstream commits you rebased onto. Only then git stash drop. Conflicts are often pure adjacency (one side edited a line, the other deleted its neighbour), so read the upstream diff before picking sides: usually you keep upstream's edited lines and the working tree's deletions.