Reputation: 1091
I have a problem when I try to checkout to a branch. Im getting the error:
Please, commit your changes or stash them before you can switch branches.
error: The following untracked working tree files would be overwritten by checkout:
build/classes/bp/conf/db/user.sql
build/classes/bp/conf/db/user_group.sql
build/classes/bp/conf/db/user_info.sql
build/classes/views.properties
I cannot stash or commit them because those files are included in the .gitignore
.
Please help.
Upvotes: 0
Views: 69
Reputation: 1091
I just solved it with rm -r build/
to remove untracked files and continue checkout to a branch. :)
Upvotes: 0
Reputation: 300815
The branch you are switching to has these ignored files checked in, so you need to do something with them.
Either delete them, move them out of the way, git stash
them, or commit them.
If you want to commit them, use git add -f
to force them to be added.
Upvotes: 2