0

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?

qtgye
  • 3,370
  • 2
  • 14
  • 30

2 Answers2

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
  • 13,642
  • 2
  • 42
  • 51
0

If your code is in github you should use their webhooks.

github webhooks

CodeWizard
  • 110,388
  • 20
  • 126
  • 153