Temporarily lock a git repository

前端 未结 3 1272
北荒
北荒 2021-02-20 17:50

Do you know if there is a way to block committing to a local git repository? In my build environment, I\'m running some git commands through it and it breaks if the user makes

3条回答
  •  逝去的感伤
    2021-02-20 18:06

    Look into .git/hooks/pre-commit.sample. By manipulating this hook, you should be able to disable commit operation on remote or local git repository.

提交回复
热议问题