You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
768 B

  1. In build upstream bare repo (webserver:/usr/local/src/web/example.com/www/), run:
  2. # git init --bare --shared=group
  3. # git config receive.denyCurrentBranch updateInstead
  4. # git config receive.denyNonFastForwards false
  5. ?(# git config core.sharedRepository true)
  6. # git worktree add /srv/prod/example.com/www master
  7. # git worktree add /srv/beta/example.com/www release
  8. # git worktree add /srv/dev/example.com/www dev
  9. # chown -R root:srv .
  10. # chmod -R g+swX .
  11. # chown root:srv /srv/prod/example.com/www
  12. # chmod g+swX /srv/prod/example.com/www
  13. # chown root:srv /srv/beta/example.com/www
  14. # chmod g+swX /srv/beta/example.com/www
  15. # chown root:srv /srv/dev/example.com/www
  16. # chmod g+swX /srv/dev/example.com/www
  17. and add your user (on the server) to the srv group.