Re: I don't want the .git directory next to my code.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> 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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux