Changing git conflict markers

爱⌒轻易说出口 提交于 2019-12-04 04:16:25

Even if there were a way to make custom conflict markers LaTeX specific (I don't think there is but I could very well be wrong), it might be tough to pick one that worked in all cases. An easier solution would be enabling git's stock "pre-commit" hook, which identifies conflict markers at commit time and rejects the commit if they're present. To enable it:

cd <repo>
mv .git/hooks/pre-commit.sample .git/hooks/pre-commit

The stock hook that ships with git also looks for whitespace errors. To run the check manually, use this command:

git diff --check

Maybe you can change the attribute conflict-marker-size with a big number. By big number, I mean a number that would trigger a Latex warning because the line is too long.

$ cat .gitattributes
*.tex conflict-marker-size=100 ;# Or whatever makes Latex unhappy
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!