git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniele Segato <daniele.bilug@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Locally manage user/branch setting files without pushing them  remotely
Date: Wed, 11 Nov 2009 13:01:26 +0100	[thread overview]
Message-ID: <9accb4400911110401g5c44d011u50cafcfe736a2ec6@mail.gmail.com> (raw)

Hi,

I had a situation I don't know how to manage with Git.

The project has a lot of setting that are really binded to the user
and should not go pushed in a remote repository (example: database
connections parameters / filesystem paths)
We have a .template file for those settings but the actual settings
are really binded to the user environment.
I added those files to the .gitignore but now I can't keep an history
of them and I can't use different version of them in different
branches.

I tell you what's the real situation but I will simplify things a
little, suppose I only have two branches: master and experiments.

I've a java application and some ANT script to automatizations like
compiling, packaging and deploying stuffs.

On my system I had two application servers and two databases one for
"master" and the other for "experiment".
There is a property files with the path of the two application servers
and the parameters to connect at the DB.

The ant script automatically deploy on the right application server
and automatically set the properties to connect at the right database.

This allow me to clean my experimantal database everytimes I need to
and start over by a clean situation and keep the "master" one
populated with all the data so I can do stress test/update procedures
test and so on...

At the moment I manually modify that property files when I checkout
one of the two branches and I need to deploy it to test or whatever.



Is there a way with Git to automatically switch that file when i
switch through branches?
It would be really perfect if I could also keep version of that file
so that when I checkout an old commit I had the options I was using
when I was testing that commit.

Ideally that means that should be some files that are kept within each
commit but they are not pushed to a remote repository.
(Even if i'm talking about pushing I'm using git-svn because my
company still use SVN as versioning system so I don't push but i do
git svn dcommit when committing on a remote repository)

How do you manage situation like this?

thanks,
Daniele

             reply	other threads:[~2009-11-11 12:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 12:01 Daniele Segato [this message]
2009-11-11 12:14 ` Locally manage user/branch setting files without pushing them remotely Yann Simon
2009-11-11 13:00   ` Daniele Segato
2009-11-11 13:06     ` Yann Simon
2009-11-11 13:46     ` Paolo Ciarrocchi
2009-11-11 19:24 ` Nicolas Sebrecht
     [not found]   ` <9accb4400911120118t3257a1n6f2a05abb1008c8@mail.gmail.com>
2009-11-12  9:29   ` Daniele Segato
2009-11-12  9:31     ` Nicolas Sebrecht
2009-11-12 10:13       ` Daniele Segato
2009-11-12 11:15         ` Nicolas Sebrecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9accb4400911110401g5c44d011u50cafcfe736a2ec6@mail.gmail.com \
    --to=daniele.bilug@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).