Re: I don't want the .git directory next to my code.
- From
Wincent Colaiuta <win@wincent.com>
- Date
- Jan 17, 2008, 10:34 UTC
- Message-ID
- <6D3239B9-FFE2-48AB-A127-E394D2FC8130@wincent.com>
- In-Reply-To
- <478EEAC4.2010006@talkingspider.com>
El 17/1/2008, a las 6:42, Mike escribió:
Show 25 quoted lines
> 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. > > The "development server -> staging server -> live > server" model has been around in common use for as long as web > applications have. In fact, the term "deployment" falls apart here. > From my web app developer perspective, the deployment is what lands > on the live server. For your git perspective, the "deployment" may > mean the .../docroot/php directory for the development server (where > our app code lives).
I don't think so. Most people I speak with doing web app development develop locally and deploy remotely.
> 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.
Assuming you're using Apache, why don't you just add an .htaccess file to your repo at the top level which instructs Apache to forbid all access to .git and its contents? If Apache is so broken that you can't trust Apache to forbid access in those circumstances, then you can't trust it to not allow access to arbitrary paths on your filesystem outside of your doc root anyway.
Cheers, Wincent