The problem is that it's risky, because your local changes are seen by git as diffs relative to the current branch tip, but those diffs may not be applicable to the other branch. For instance if you added a line after an existing line, and that line doesn't exist on the other branch, git won't know what to do
From the command line you can do git checkout -m branch
which attempts a "merge" algorithm, which may work, or else give you a mess of merge conflict markers
Otherwise you can stash your changes, and pop them back later
git stash
(...later...) git stash pop
(git stash pop
can result in merge conflicts if you aren't in the same state your were when you stashed it. If so you get the merge conflicts to resolve, and the stash remains on the stack too.)
The third option is to erase your changes. You can do that from the command line with git checkout. git checkout -p
will prompt you before reverting each change, so you can be sure you're not throwing away anything important.
I think (not sure) `g