Howto prevent git from pushing changes to some files

前端 未结 2 1086
逝去的感伤
逝去的感伤 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?

提交回复
热议问题