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,580
  • 2
  • 15
  • 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
  • 14,447
  • 2
  • 38
  • 52
0

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

github webhooks

CodeWizard
  • 128,036
  • 21
  • 144
  • 167