views:

94

answers:

2

Hi.

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.

A: 

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?

Noufal Ibrahim
I can't add the to `.gitignore` because they're already in the repo. What i would like is exactly what you refer next. Keep them locally but not push changes upstream.
Gonçalo Marrafa
+1  A: 

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.

peritus