How to permanently prevent specific part of a file from being committed in git?

后端 未结 6 561
一个人的身影
一个人的身影 2020-12-10 04:07

I have cloned a remote SVN repository with git-svn. I have modified a pom.xml file in this cloned repo in a way that the code compiles. This setup is exclusive for me. Thus

6条回答
  •  盖世英雄少女心
    2020-12-10 04:24

    Good ideas suggested already. Prehooks seem most suitable perhaps. Some other avenues to consider might be: - Fork the repo and commit all changes - Commit a separate branch on same repo and commit that - Have a local branch of just your private diffs which you cherry pick when you check out, and reverse before checking in? - Apply patch files - again which can be reversed before checking in (problematic though)

提交回复
热议问题