I have this in my .gitignore file:
/nbproject/ /app/runtime/ /app/runtime/application.log* /app/runtime/error.log* /app/config/localdev.php* .DS_Store
1) I have a checkout for the master branch , and then check again, go back to the dev branch .
2) As soon as I returned to the dev branch , I lost all / nbproject / files and all /app/config/localdev.php! And maybe others, but since they are created automatically using the PHP version of uppon runtime, I can’t say!
3) Then I will return to the main branch , and I received these files there.
4) I copied these files somewhere else, and I switched back to the dev branch .
5) I put these missing files back in / nbproject / folder.
Now, if I try to switch to the master branch, I get the following:
Error: The following untracked working tree files would be overwritten by checkout: nbproject/private/config.properties nbproject/private/private.properties nbproject/private/private.xml nbproject/project.properties nbproject/project.xml Please move or remove them before you can switch branches. Aborting
I know that I should possibly do git add . to move these files to the repository, which I don’t understand:
Why does git throw this message if I had nbproject / ignored long before these git output commands?
Question:
The point is to ignore these files. Both on the host and on dev. My question is: how can I fix this so that:
a) First: get those files (those on gitignore) back to dev?
b) Second: take steps to avoid this conflict again.