Git: how to make remote directory update when pushed to?

后端 未结 4 1724
醉话见心
醉话见心 2020-12-06 07:27

I want to use git to manage some data on a remote server, so I set up a non-bare repository there. I can push to it without problems, and the repository its

4条回答
  •  [愿得一人]
    2020-12-06 07:47

    This, happily, is now supported directly in git itself! You can find the details in this answer, which I have just upvoted:

    https://stackoverflow.com/a/38363683/85360

    It recommends configuring the remote with

    git config receive.denyCurrentBranch updateInstead
    

    so that pushes result in an updated working copy!

提交回复
热议问题