Reputation: 12276
I have a file ignored with .gitignore, from time to time the file just dissapears.
The file's inclusion in .gitignore is present in all the branches so I don't think switching branches is deleting it.
Any idea what may happen with this?
I think the file was tracked at some point but it's now untracked and ignored because it depends on the environment and each installation needs its own version.
There is no deploy script that may be deleting it.
Edit:
I realized that master's .gitignore had global reference env.php
and staging's .gitignore had local referencesubdir/env.php
, so maybe that was the issue.
Upvotes: 0
Views: 55
Reputation: 171
Based on your description, it looks like the file was included in some branches before including the row in the .gitignore If the archive was committed before adding the exception, it will be there until you remove it explicitly. Review (and delete) the file from your repository to avoid this problem in the future.
Regards Andoni
Upvotes: 1