I'm getting the "The following untracked working tree files would be overwritten by checkout...please move or remove them before you switch branches" error.
The common fix appears to be git clean
When I type that in, I get no error, but nothing happens. And when I go to check out another branch, I just get the same error as above.
Any reason as to why git clean
would do absolutely nothing?
UPDATE:
More info. git -n
and git -f
do exactly the same...nothing.
If you want to clean untracked files, use the below command. But, take care before running this, as it will wipe your working area, index, HEAD.
I think you are having untracked directories or ignored files(build files) of gitignore in your working area. you can remove them by the below command.
For more information git clean