Just an update on my solution. It works quite well but there is a
catch. Certain operations will overwrite the ignored file or
directory in your local copy. For example, stash and revert. I just
cp over the ignored file after doing those operations. Not perfect
but better than the shell scripts I was using before.
On Mar 4, 5:43 am, vfclists <vfcli...@googlemail.com> wrote:
> On Feb 23, 8:00 pm, drewB <dbats...@gmail.com> wrote:
> > I work with a small team of developers and there is one file
> > (db.config) under version control that I need to be different than the
> > other team members. Unfortunately, the powers that be have determined
> > that we can't take the file out of version control for deployment
> > reasons (so the usual git ignore won't work). So, I am left with a
> > single file that is always out of sync.
> > The best solution I could come up with is to write a shell script for
> > running git commands. The script makes a copy of my db.config and
> > then overwrites it with a version that matches what is in the remote
> > repo. Next, the git command is run and finally my version is copied
> > back. This does that job but seems very clunky.
> > Is there some other way to accomplish this more elegantly?
> I am new to git, but I suspect that what you want to do is better
> achieved with some kind of post-deployment, or some hook on the
> deployment site that reverts the file in question to what you want
> after you deploy.
> I suspect that there are some stuff like settings like usernames,
> passwords etc that have to be maintained across changes. I think you
> should use template variables in the file you are changing and then
> substitute the template variables with proper settings after uploading
> > Thanks!
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at