git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike <fromlists@talkingspider.com>,
	Neil Macneale <mac4-git@theory.org>,
	git@vger.kernel.org
Subject: Re: I don't want the .git directory next to my code.
Date: Wed, 16 Jan 2008 11:23:07 -0800	[thread overview]
Message-ID: <7v8x2pr2w4.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0801161000310.2806@woody.linux-foundation.org> (Linus Torvalds's message of "Wed, 16 Jan 2008 10:15:12 -0800 (PST)")

Linus Torvalds <torvalds@linux-foundation.org> writes:

> Let me do a few examples of why this is a good idea:
>
>  - the whole point of development trees and SCM's (and that's *especially* 
>    true with git) is how you can try things out, go backwards in time, and 
>    generally just do *development*.
>
>    If you do that in what is your public deployment area, you're already 
>    very limited. Not only may you not want to make that .git directory 
>    accessible to others (while you *do* obviously want to make the 
>    deployment itself), you also end up exposing things like your 
>    management scripts and source code along with "generated files" etc 
>    that are the things you actually want to deploy.
>
>    Yes, it's certainly quite possible that you simply don't have any 
>    management scripts etc, and that you don't generate any files, and you 
>    simply want to just deploy the exact files that you also want to track. 

Even without any management script, you cannot do any _development_
in such a tree.  By definition, mucking with the files in the
deployment area means all of your changes are immediately visible by
the clients.

One reason (admittedly misguided) people mentioned why they want
to do this is because they want to be able to "git-add" files
generated on the deployed server by client actions (think of a
Wiki that drops new contents in an area writable by the
webserver).  If your deployment area is _not_ managed by git,
they instead need to write a Makefile target in their
development area that takes new/modified files back to the
development tree and "git-add" those copies.

The right way to manage these client-generated contents would of
course be to commit them to a branch separate from the sources
you develop (otherwise your history will be a mixed mess between
the true development and client content changes), so the
argument is very weak and is not a good justification for
wanting to have deployment and development tree as one.

But I can well imagine that it is a tempting way to work for
people who have not thought about the reason why history
matters, especially for the ones who still suffer from CVS
braindamage that makes separate branches inpractical.

  parent reply	other threads:[~2008-01-16 19:23 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
2008-01-16 19:23           ` Junio C Hamano [this message]
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=7v8x2pr2w4.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=fromlists@talkingspider.com \
    --cc=git@vger.kernel.org \
    --cc=mac4-git@theory.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).