Andrew Ardill [off-list ref] writes:
On 4 February 2013 23:14, Robert Clausecker [off-list ref] wrote:
quoted
The specific workflow I am planning is this:
I have a server that hosts a bare git repository. This git repository
contains a branch production. Whenever somebody pushes to production a
hook automatically puts a copy of the current production branch
into /var/www/foo. I could of course use pull for that but it just does
not feels right. Why should I have a repository twice on the server?
Maybe I'm missing something. How does the behaviour you need differ from
quoted
GIT_WORKING_DIR=/var/www/foo git checkout -f <tree-ish>
??
In addition to the fact that your misspellt environment variable
name will not cause it to write there, you will also be overwriting
the index for your working tree, which presumably you meant is a
location different from the /var/www/foo, with the contents of
<tree-ish>.