git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Handling non-git config files
@ 2010-02-23 22:37 Richard Lee
  2010-02-24  1:46 ` Tim Mazid
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Richard Lee @ 2010-02-23 22:37 UTC (permalink / raw)
  To: git

Hi again git-list,

I have a workflow-related query.

I understand that git is for source code mangement. However in certains
applications like web applications in a live environment, it ends up
storing data related to the state of the application as well.

I myself am a web developer and for me git ends up storing data like the
root path of the web app. I would like to work on a test rig, commit and
push the changes to a central repo. Then pull the changes on to the live
server. Having different config files on the test and live deployments
make this workflow difficult as I don't know how to tell git to handle
the different config files. I have managed to do this with patches, but
I do not thing it is good in the long run.

I would put the config data in it's own location, but unfortunately I
have been given a product to work with and I cannot do that. This means
that config data that I do wish to commit is in the same file as data
that would vary from deployment to deployment.

Currently I only work on the live server with git. Firstly this is not
ideal to experiment on a live site. Secondly my colleagues now want to
learn git and you can't have several people performing git operations on
the same working directory.

So my quesstion is that is there any way to have several checked out
copies of a git repo each with their own slightly different config
files, yet still being able to perform git operations with respect to a
centralised repository as if they were identical?

I've thought about using a migration script for each target deployment
and then ignoring any changes related to the deployment. I've also
considered having each deployment as a seperate branch and then rebasing
changes back and forth. However this seems uneccesarily complicated and
I teaching git beginners about rebasing doesn't seem like a good idea.

The first solution give a me a corrolary question. I use tig for staging
changes. In the config file, the lines specific to the deployment can
end up in the same hunk as lines specific to the application that I do
want to keep. Can I stage partial hunks in tig? Or do I have to use git
add --interative?

Regards,

Richard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-09 12:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-23 22:37 Handling non-git config files Richard Lee
2010-02-24  1:46 ` Tim Mazid
2010-02-24 18:27 ` Ian Hobson
2010-02-24 21:37 ` Jon Seymour
2010-03-09 10:50   ` rhlee

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).