我已经使用 git svn 克隆了一个 subversion 存储库。源代码有一些配置文件,我必须对其进行编辑以适应我的系统。我想将我对这些文件的更改存储在我的本地存储库中(以便在分支之间轻松切换而不必担心本地修改的文件),但我想防止将这些更改推送到远程存储库。
有谁能够帮我?
提前致谢。
我已经使用 git svn 克隆了一个 subversion 存储库。源代码有一些配置文件,我必须对其进行编辑以适应我的系统。我想将我对这些文件的更改存储在我的本地存储库中(以便在分支之间轻松切换而不必担心本地修改的文件),但我想防止将这些更改推送到远程存储库。
有谁能够帮我?
提前致谢。
大约一年前,我写了git-overlook,现在我意识到这是一个基于大块的 git-ignore。它是 alpha 软件,没有我想要的所有功能,但也许是您正在寻找的。
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?