Stash your changes in the current branch with the following.

git stash save <name_your_stash>

This will save your current changes which you don't wish to commit.

Now you can switch to another branch.

If you want your stashed changes back , do:

git stash list - to view your changes.


git stash apply - to apply your changes.

If you are fine with committing the changes, git add your file and commit 
it. This would allow you to switch between branches.

On Monday, July 29, 2013 8:03:41 PM UTC+5:30, Ling wrote:
> Hello,
> When I try to checkout the different branch and I got below errros:
> error: Your local changes to the following files would be overwritten by 
> checkout:
> .....
> how do I get this working so I can switch branches?
> Thanks
> Lingfei

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to