From: "Martin Langhoff" <martin.langhoff@gmail.com>
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 10:05:50 +1300 [thread overview]
Message-ID: <46a038f90801171305t78fa1758l9ddf2d70890aea9f@mail.gmail.com> (raw)
In-Reply-To: <478EEAC4.2010006@talkingspider.com>
On Jan 17, 2008 6:42 PM, Mike <fromlists@talkingspider.com> wrote:
> With PHP, Python, and Ruby, the development is the deployment. The
Plenty here use git for web apps.
> 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.
*First* - people here have pointed out various ways of doing this with
the GIT_DIR env variable. Nothing is being violated.
In terms of the best-practice you mention of publishing only the
reachable files, your checkout is one directory higher. The top-level
dir of your checkout should look like:
.git
htdocs # this is published
conf # configuration files
lib # libraries
if you publish the top of your checkout, your libraries sit in there.
Along your .git and your config files.
> Among the reasons for that is security. If one of those .git dirs does
> slip out and go live, it's a *huge* *gaping* *security* *hole*. You
Well -- I routinely add .git CVS and .svn to http.conf with a
directorymatch clause to prevent access to them. Just in case,
belts-and-suspenders.
> If we end up having to write a special "publisher" app to move files
> from dev to live, then it will only be because of those damn .git
> directories.
Nah! It'll be because of a long list of things, including temp files,
backup files that developers make, all sorts of things in your *work*
dir that you really need there and you really should _not_ have in the
production checkout.
BTW, I also add common patterns for those temp files to httpd.conf to
restrict access to them.
> Maybe git just isn't intended to be used for anything besides compiled
> languages like c? Or maybe just not for web app development?
C produces a ton of intermediary files that git never commits, and C
projects usually get an "installer" too (debian's apt/dpkg, rpm, etc).
Writing PHP/Ruby/Python produces less "intermediary" files, but it
still creates some, so there's plenty of good reasons to have an
"installer".
GIT does the SCM thing, but for handling your deployment you need
something else. I normally use scripts that use git internally,
written in make, perl or shell.
cheers,
martin
next prev parent reply other threads:[~2008-01-17 21:06 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 [this message]
2008-01-18 8:41 ` Andreas Ericsson
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=46a038f90801171305t78fa1758l9ddf2d70890aea9f@mail.gmail.com \
--to=martin.langhoff@gmail.com \
--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).