This is because some or all of the files that are not tracked in your current branch are tracked by the branch you want to change.
For example, a branch may contain the file CHANGES.txt. Since git does not want to overwrite the file that you have in your workspace, if you give this error, to allow the backup of files that you have locally. You can:
- Move these files somewhere safe
- If you are sure that you do not need these files, you can perform the -f check to switch to the branch (this will overwrite any conflicting files)
Stashing does not work for files that are not tracked in the current branch. You can use git diff to determine which files are at 0.20, but not at 0.21. For instance:
git diff --name-only branch-0.20
source share