I am working on windows. Using Git I am trying to switch to another local branch but it won't let me due to this error:
Your local changes to the following files would be overwritten by
checkout:
codelibrary/inc/variables.php
But when I do git status on my current branch, I get:
nothing to commit, working tree clean
I've seen 2 questions that are the same as mine in these links:
- git status shows modifications, git checkout -- <file> doesn't remove them
- can't checkout a git branch - need to commit changes, but no changes are present
But none of the answers seem to solve my problem.
I suspect I had the file ignored in my current branch but not in the branch I want to switch to.
I'm new to git so I would like to ask the git pros to please help me with this.