I'm trying to jump from branch but git is aborting the operation.
I'm in the dev branch trying to go to the master branch:
$ git checkout master
Error:
error: Your local changes to the following files would be overwritten by checkout:
.env
Please, commit your changes or stash them before you can switch branches.
Aborting
But when checking my desktop I can not find anything $ git status
:
No ramo dev
Your branch is up-to-date with 'dev/master'.
nada a submeter, diretório de trabalho vazio
As I also try to make a $ git stash
:
No local changes to save
I tried to use git checkout -f master
but it did not work:
error: Entry '.env' not uptodate. Cannot merge.
Note: .env was originally in .gitignore , but in order to be able to send to a remote repository I had to remove it . Then I made the git push
I needed, I went into .gitignore again I added it and made a git update-index --assume-unchanged .env
to remove it from the versioning.