Writing a pre-push hook in Git to grep all files for regex want to reject push if regex not found

后端 未结 1 1299
余生分开走
余生分开走 2021-01-23 05:36

I have the following pre-push hook. Ideally I would like it to go through all files that are being pushed to my repository and reject the push if the content of any of the files

相关标签:
1条回答
  • 2021-01-23 06:26

    Just needed to use ".each_line" instead of ".each".

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