预先推送git hook?

Lan*_*ard 2 git githooks

我想先运行一个压缩脚本git push,以便用户每次将更改推送到远程存储库时,它都会检查可压缩资产中未提交的更改,中止git push,运行git commit,然后git push再次运行。

仅使用git hooks就能做到吗?

man*_*lds 5

Git是得到一个pre-push在钩1.8.2释放。

示例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