views:

20

answers:

1
+1  Q: 

rails log issue

how do i fix this issue and get it to stop happening

CONFLICT (delete/modify): log/development.log deleted in eccc398bb3058c5c0cc9e3587aae93289597fc0f and modified in HEAD. Version HEAD of log/development.log left in tree.

I have it in .gitignore

+5  A: 

Delete it and commit it.

git rm log/development.log
git commit -m "Removed development log file which was supposed to be ignored."
git push

Now check and make sure your .gitignore file is set up correctly.

touch log/development.log
git add log/development.log

And you should get this back from git:

The following paths are ignored by one of your .gitignore files:
log/development.log
Use -f if you really want to add them.
fatal: no files added

If you didn't get this, your .gitignore file is incorrect. If you got the right output, the only way someone could have committed the log file is if they changed their .gitignore (locally or overriding the ignore with their global core.excludesfile) or they used the -f switch to force it.

Samuel