我希望在git push
之前運行壓縮腳本,以便在用戶嘗試將更改推送到遠程存儲庫時,它會檢查可壓縮資產中未提交的更改,中止git push
,運行git commit
,然後再次運行git push
。預推git掛鉤?
是否可能只使用git掛鉤?
我希望在git push
之前運行壓縮腳本,以便在用戶嘗試將更改推送到遠程存儲庫時,它會檢查可壓縮資產中未提交的更改,中止git push
,運行git commit
,然後再次運行git push
。預推git掛鉤?
是否可能只使用git掛鉤?
看看this patch。
請參閱.git/hooks/
在您的回購示例鉤子,也許你會看到一些替代。
Git在1.8.2
版本中獲得pre-push
掛鉤。
樣品pre-push
腳本:https://github.com/git/git/blob/87c86dd14abe8db7d00b0df5661ef8cf147a72a3/templates/hooks--pre-push.sample
1.8.2版本說明草案談論新推前鉤:https://github.com/git/git/blob/master/Documentation/RelNotes/1.8.2.txt