Temporarily lock a git repository

前端 未结 3 884
悲&欢浪女
悲&欢浪女 2021-02-20 17:17

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:13

    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.

提交回复
热议问题