Run git commands on remote working tree (GIT_WORK_TREE=/path)

前端 未结 1 1405
名媛妹妹
名媛妹妹 2021-01-15 11:29

I have a bare git repo set up which runs a post-update hook as follows:

GIT_WORK_TREE=/path/to/code git checkout -f

This works well when pu

相关标签:
1条回答
  • To checkout a tag on the remote side, you need to push it first:

    git push --tags
    

    As mentioned in "With GitHub how do I push all branches when adding an existing repo?", even git push --all wouldn't push your tags, only all refs under refs/heads/.

    0 讨论(0)
提交回复
热议问题