Howto prevent git from pushing changes to some files

前端 未结 2 1066
逝去的感伤
逝去的感伤 2021-01-13 22:55

I\'ve cloned a subversion repository using git svn. The source has some config files that i have to edit to fit my system. I would like to store my changes to those files in

相关标签:
2条回答
  • 2021-01-13 23:32

    Can't you just put those files in .gitignore and use the rest of the repo as is? I think it should work. Or do you want the files to be version controlled locally but just not pushed? I'm not sure if that's possible since it's changes that get pushed rather than files.

    If you already have a .gitignore in the repo, you can alter your local git config to use another exclude file in which you exclude the files you want to (git help gitignore) for details. Would that work?

    0 讨论(0)
  • 2021-01-13 23:50

    About a year ago I wrote git-overlook, which I now realize is a hunk-based git-ignore. It's alpha-software and does not have all the features I want, but perhaps what you're looking for.

    0 讨论(0)
提交回复
热议问题