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.

28 lines
967 B

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