* Git Architecture Question
@ 2010-12-28 16:54 Anuj Gakhar
2010-12-28 17:23 ` Manuel Doninger
2010-12-29 3:58 ` Maaartin
0 siblings, 2 replies; 3+ messages in thread
From: Anuj Gakhar @ 2010-12-28 16:54 UTC (permalink / raw)
To: git
Hi all,
I am new to Git and learning this powerful tool these days.
I have a simple question :-
I work on a project that has 3 different environments. dev, staging
and production. dev is obviously the local git repo that all dev's
work on. staging is where most of the development takes places on a
daily basis. and production is where least development happens but we
still do it because sometimes we have to fix things quickly directly
on the production server.
So how should I set this up ?
2 branches staging and master (default) ?
How can I make it so that the staging branch gets deployed to a
different folder on the server and the master branch gets deployed on
a different folder ?
Once a week, we would merge all the staging work into production and
make a release.
Any ideas ?
Anuj Gakhar
www.anujgakhar.com
www.anshconsulting.co.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git Architecture Question
2010-12-28 16:54 Git Architecture Question Anuj Gakhar
@ 2010-12-28 17:23 ` Manuel Doninger
2010-12-29 3:58 ` Maaartin
1 sibling, 0 replies; 3+ messages in thread
From: Manuel Doninger @ 2010-12-28 17:23 UTC (permalink / raw)
To: Anuj Gakhar; +Cc: git
Hi Anuj,
i'm facing a similar problem at the moment.
In my company we want to switch from CVS to Git and Ant to
Maven/Hudson. We have a similar environment like you, Development,
Testing and Production, and my plan at the moment is to have a
development, testing and master branch. Every of these branches should
represent the appropriate environment. Then I configure Hudson with 3
jobs, every job to build one of these branches and to deploy to a
separete folder on our server.
If the developers then create a new change in a feature branch, we
would merge that feature branch into branch development for our
internal tests, then later merge that into testing for our QA
department if they say they want to test that change, and if they say
it's ok, merge that change into master to deploy it in production
environment.
This workflow is though not in production use, we evaluate this and
other workflows at the moment, so I don't have any experiences from
daily work.
Cheers,
Manuel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Git Architecture Question
2010-12-28 16:54 Git Architecture Question Anuj Gakhar
2010-12-28 17:23 ` Manuel Doninger
@ 2010-12-29 3:58 ` Maaartin
1 sibling, 0 replies; 3+ messages in thread
From: Maaartin @ 2010-12-29 3:58 UTC (permalink / raw)
To: git
Anuj Gakhar <anuj.gakhar <at> gmail.com> writes:
>
> Hi all,
>
> I am new to Git and learning this powerful tool these days.
>
> I have a simple question :-
>
> I work on a project that has 3 different environments. dev, staging
> and production. dev is obviously the local git repo that all dev's
> work on. staging is where most of the development takes places on a
> daily basis. and production is where least development happens but we
> still do it because sometimes we have to fix things quickly directly
> on the production server.
>
> So how should I set this up ?
>
> 2 branches staging and master (default) ?
I wouldn't use "master" for the production branch, I'd call it simply
"production" (there's nothing special about master, except that it's the
default when you start). However, it's quite easy to change it anytime.
Especially, each developer may create their own private branches at will. When
working on multiple topics concurrently you'll probably create multiple shared
"staging" branches. It's all very fast and very easy to do.
> How can I make it so that the staging branch gets deployed to a
> different folder on the server and the master branch gets deployed on
> a different folder ?
You can control both the working tree directory and the git directory using
environment variables (GIT_WORK_TREE and GIT_DIR), so it's easy, e.g.
cd stagingFolder; GIT_DIR=..../.git git checkout staging
You can use options like --git-dir instead, s. http://www.kernel.org/pub/
software/scm/git/docs/
> Once a week, we would merge all the staging work into production and
> make a release.
>
> Any ideas ?
It may be useful to have a single person responsible for this merging.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-29 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-28 16:54 Git Architecture Question Anuj Gakhar
2010-12-28 17:23 ` Manuel Doninger
2010-12-29 3:58 ` Maaartin
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).