如何防止git将更改推送到某些文件 [英] Howto prevent git from pushing changes to some files

查看:147
本文介绍了如何防止git将更改推送到某些文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用git svn克隆了一个Subversion版本库。来源有一些配置文件,我必须编辑,以适应我的系统。我想将我的更改存储在本地回购中的这些文件(以轻松地在分支之间切换而不用担心本地修改的文件),但是我想阻止将这些更改推送到远程存储库。



任何人都可以帮我吗?

预先致谢。

解决方案

大约一年前,我写过 git-overlook ,我现在认识到这是一个基于块的git-ignore。这是alpha软件,并没有我想要的所有功能,但也许你在找什么。


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 my local repo (to easily switch between branches without worrying about locally modified files) but i would like to prevent those changes to be pushed to the remote repository.

Can anybody help me?

Thanks in advance.

解决方案

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.

这篇关于如何防止git将更改推送到某些文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆