Maintain multiple simultaneously-accessible versions of website remotely using Git

后端 未结 2 394
长情又很酷
长情又很酷 2020-12-20 02:17

I want to set up Git so I can have various versions of the same website accessible simultaneously. For example, a \'Sandbox\' site, a \'Staging\' site and a \'Production\' s

2条回答
  •  悲哀的现实
    2020-12-20 02:41

    Checkouts in the post-update hook will work, but you might want to define also GIT_DIR

    See:

    • "using git to deploy my node.js app to my production server"
    • "Git checkout in post-receive hook: “Not a git repository '.'”"

    That will make sure the git commands knows where the git repo is.

提交回复
热议问题