Locally manage user/branch setting files without pushing them remotely

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]