From: Andreas Ericsson <ae@op5.se>
To: Mike <fromlists@talkingspider.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: I don't want the .git directory next to my code.
Date: Fri, 18 Jan 2008 09:41:39 +0100 [thread overview]
Message-ID: <47906643.2010201@op5.se> (raw)
In-Reply-To: <478EEAC4.2010006@talkingspider.com>
Mike wrote:
>
>
> Linus Torvalds wrote:
>
>> Some people don't split this up, and they tend to make horrible
>> horrible mistakes, like checking in the *results* of the
>> post-processing too (ie binary result blobs that can be regenerated
>> from the other files), because they don't make a clear separation
>> between the parts they do development on, and the end result.
>
> Honestly, I think your mode of thinking is centered around compiled
> languages and linux app(/kernel) development. The web app
> development/deployment model is very different.
>
> With PHP, Python, and Ruby, the development is the deployment. The
> source is the output. You can't develop web apps in those languages
> unless the source files you're working on are under the doc root of your
> development server. "the parts they do development on" and "the end
> result" *are* the same files.
>
We develop several different PHP packages. We have a test-server where
pandemonium reings with regards to .git directories and which branches
are checked out where. We also have a release process, and .git dirs
*never* end up on production servers.
The release-process is this: "git tag -s $tag_name; git push $tag_name".
The update-hook then marks the repo as having a new release and a cron-
job, running every 5 minutes, takes care of updating our production
servers. It took me all of 30 minutes to hack up, and not only does it
make sure we never publish the .git directory, it also makes it really,
really easy for <insert-non-git-savvy-customer-X> to report a version in
which he or she has spotted a bug.
>
> There's a fundamental "best practice" of web development being violated
> here- keep your docroots clean, only put stuff in them that should go
> live (or should eventually go live when ready). Other files should not
> live under docroot.
>
You accomplish that by making sure only stable and signed versions hit
the deployment server(s). Manual scp/rsync/ftp-mirroring of the testing
server's docroot is just plain stupid.
>
> Maybe git just isn't intended to be used for anything besides compiled
> languages like c? Or maybe just not for web app development?
>
Well, it was originally intended to manage the Linux kernel, but it's
written in such a way as to be capable of competently manage just about
anything.
> Finally, to this statement:
>
>> It's almost always a bad idea to develop in the tree that is also where
>> you "export" things, and if you find git annoying in this respect, ask
>> yourself why pretty much *every*single*scm*out*there* makes their
>> infrastructure even more noticeable (eg CVS subdirectories in every
> single
>> directory etc)
>
> I don't think that pointing at other SCM's practices as the authority is
> the stance you really want to take. I can direct you to a video of a
> speech by a brilliant guy, in front of some googlers, where he explains
> that the entire reason he started the git project is because of the
> problems with "*every*single*scm*out*there*".
>
Those problems aren't "all the scm's in the world store their meta-data
somewhere!" though, and the ability to tar up a working-tree and get the
git-directory too is not always a bad thing. It's just your release
process that needs to eliminate the manual step there so you never copy
it by accident. That's why people write small and simple scripts though.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2008-01-18 8:44 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-16 3:27 I don't want the .git directory next to my code Mike
2008-01-16 3:50 ` Randal L. Schwartz
2008-01-16 4:07 ` Mike
2008-01-16 4:24 ` David Symonds
2008-01-16 4:29 ` Mike
2008-01-16 4:36 ` Sean
2008-01-16 17:31 ` Mike
2008-01-16 5:27 ` Neil Macneale
2008-01-16 17:23 ` Mike
2008-01-16 17:51 ` Johannes Schindelin
2008-01-16 18:15 ` Linus Torvalds
2008-01-16 18:25 ` Linus Torvalds
2008-01-17 5:42 ` Mike
2008-01-17 6:38 ` Kris Shannon
2008-01-17 10:34 ` Wincent Colaiuta
2008-01-17 15:17 ` Jeff King
2008-01-17 17:36 ` Linus Torvalds
2008-01-17 17:49 ` Johannes Schindelin
2008-01-17 18:02 ` Linus Torvalds
2008-01-17 18:10 ` Johannes Schindelin
2008-01-17 19:12 ` Mike
2008-01-17 19:20 ` Johannes Schindelin
2008-01-17 20:00 ` Mike
2008-01-17 20:08 ` Johannes Schindelin
2008-01-17 20:49 ` Mike
2008-01-17 20:57 ` Johannes Schindelin
2008-01-17 21:00 ` Mike
2008-01-17 21:05 ` Johannes Schindelin
2008-01-18 7:52 ` David Symonds
2008-01-22 10:27 ` Russ Dill
2008-01-17 21:05 ` Martin Langhoff
2008-01-18 8:41 ` Andreas Ericsson [this message]
2008-01-16 19:23 ` Junio C Hamano
2008-01-17 2:00 ` Ping Yin
2008-01-17 2:38 ` Linus Torvalds
2008-01-16 3:56 ` Dan McGee
2008-01-16 6:00 ` Mike
2008-01-16 6:07 ` Mike Krier
2008-01-16 6:09 ` Mike
2008-01-16 4:03 ` Nguyen Thai Ngoc Duy
2008-01-16 4:06 ` David Symonds
2008-01-16 4:18 ` Mike
2008-01-16 4:44 ` Daniel Barkalow
2008-01-16 4:55 ` Luke Lu
2008-01-16 17:23 ` Mike
2008-01-17 1:42 ` Sam Vilain
2008-01-16 4:13 ` Daniel Barkalow
2008-01-16 4:24 ` Mike
2008-01-16 10:37 ` Johannes Schindelin
2008-01-16 13:21 ` Bert Wesarg
2008-01-16 22:33 ` Wayne Davison
2008-01-16 9:59 ` Matthieu Moy
2008-01-16 10:36 ` Johannes Schindelin
2008-01-16 11:41 ` Bill Lear
2008-01-16 12:25 ` Matthieu Moy
2008-01-16 12:45 ` Johannes Schindelin
2008-01-16 17:40 ` Junio C Hamano
2008-01-16 17:52 ` Johannes Schindelin
2008-01-16 11:59 ` Matthieu Moy
2008-01-16 12:12 ` Johannes Schindelin
2008-01-16 13:13 ` Jakub Narebski
2008-01-17 0:59 ` Brian Downing
2008-01-17 1:35 ` Randal L. Schwartz
2008-01-17 2:59 ` Martin Langhoff
2008-01-17 5:44 ` Randal L. Schwartz
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=47906643.2010201@op5.se \
--to=ae@op5.se \
--cc=fromlists@talkingspider.com \
--cc=git@vger.kernel.org \
--cc=torvalds@linux-foundation.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).