mirror of
https://github.com/git-for-windows/git.git
synced 2026-04-13 02:23:06 -05:00
When switching branches with "git checkout -m", local modifications can block the switch. Teach the -m flow to create a temporary stash before switching and reapply it after. On success, only "Applied autostash." is shown. If reapplying causes conflicts, the stash is kept and the user is told they can resolve and run "git stash drop", or run "git reset --hard" and later "git stash pop" to recover their changes. Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>