Quantcast
Channel: deploy development and master branch on server with git - Server Fault
Viewing all articles
Browse latest Browse all 3

deploy development and master branch on server with git

$
0
0

I´m using git for a django webproject. I have a bare git repo on my server and push my commits from my local machine into it. I also have a testserver on my local machine but I would like to have 2 versions of the website on the server. one version as live site (master branch) and one version as testserver (develop branch). So I need 2 working directories.

I would like to use the post-receive hook to

  1. update my master branch working directory (for the live site on server)
  2. update my develop branch working directory (for my test site on server)

normally I would do

$ cat > hooks/post-receive
#!/bin/sh
GIT_WORK_TREE=/path/www.example.org git checkout -f
$ chmod +x hooks/post-receive

but GIT_WORK_TREE seems not to be the right choice here I guess? Is there a better way?

how can I define the working directories for branches?


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>