bash
pre-push
[使用命令git push origin <branch>或git push,伪逻辑将如下所示:
git push origin <branch>
git push
if [ remote branch about to be pushed to = master ] then; // do something fi
我将如何去做?
git rev-parse --abbrev-ref HEAD