Modify file before commit with pre-commit hook

a 夏天 提交于 2019-12-05 05:43:37
VonC

That would be done with a content filter driver:

  • a clean script which would remove the key on checkin
  • a smudge script which would add it back on checkout.

(image from "Customizing Git Attributes" from the Git Book)

See an example of how those filters are declared in "Can git automatically switch between spaces and tabs?"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!