开发者

rails log issue

开发者 https://www.devze.com 2023-01-16 02:02 出处:网络
how do i fix this issue and get it to stop happening CONFLICT (delete/modify): log/de开发者_StackOverflow社区velopment.log deleted in eccc398bb3058c5c0cc9e3587aae93289597fc0f and modified in HEAD. Ve

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

CONFLICT (delete/modify): log/de开发者_StackOverflow社区velopment.log deleted in eccc398bb3058c5c0cc9e3587aae93289597fc0f and modified in HEAD. Version HEAD of log/development.log left in tree.

I have it in .gitignore


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消