I want switch branches and have git always set the working directory contents to reflect the state of the branch I'm switching to. I'm experiencing the behaviors stated here https://web.archive.org/web/20160331103129/http://www.gitguys.com/topics/switching-branches-without-committing - git is making a decision** on whether to carry certain files from the working directory associated with my current branch to the branch I switch to.
** This seems to conflict with what's stated here https://www.atlassian.com/git/tutorials/using-branches: "Checking out a branch updates the files in the working directory to match the version stored in that branch..."
In some cases I don't want git to make a decision - I just want Git to make the working directory match the state of the new branch. However, I don't want to lose any changes. I'm willing to commit or stash prior.
Possible?
See Question&Answers more detail:os