Git allows for branch change with unstaged changes
问题 Git is allowing me to change branches when I have changes not staged for commit (modified files). Is there a configuration for this somewhere? Edit: At first I thought this was a configuration that I needed to set to disallow changing between branches if there are modified unstaged files. But by Emily's comment, it appears that you're prompted if the files differ between branches, and not prompted otherwise. 回答1: How it decides A quick experiment shows the following. Suppose you're on branch