I have read articles about automating deployment of files to the working tree of a git repository.
Just out of curiosity, how do I do that manually after I pushed all my changes to my remote repository?
Asked
Active
Viewed 67 times
0

qtgye
- 3,580
- 2
- 15
- 30
-
http://stackoverflow.com/a/7047782/579580 – aviad Apr 22 '15 at 07:20
-
Is this what you are trying to do: http://stackoverflow.com/questions/7152607/git-force-push-current-working-directory/7152800 ? – gauteh Apr 22 '15 at 07:23
2 Answers
0
You can use a post-receive
hook , see http://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
For example in your repo.git/hooks/post-receive
:
#!/bin/sh
echo "Deploy wd"
git --work-tree=/route/to/wd --git-dir=/your/route/to/repo.git checkout –f

Juan Diego Godoy Robles
- 14,447
- 2
- 38
- 52