Git pre-receive hook

后端 未结 3 1008
滥情空心
滥情空心 2020-11-28 13:25

When you enable pre-receive hook for git repository:

It takes no arguments, but for each ref to be updated it receives on standard input a line of the fo

3条回答
  •  悲哀的现实
    2020-11-28 13:51

    If you want to know the whether permissions of the files are changed in the local repository before pushing to remote repository, run git ls-tree -r commit, where commit is the SHA commit value of the local repository.

    This command gives a list of files with their permissions, which can be parsed to check if the permission of a file is changed before pushing.

提交回复
热议问题