【问题标题】:git pre-push hook fails to push everythinggit pre-push hook 无法推送所有内容
【发布时间】:2013-09-25 15:46:07
【问题描述】:

我需要更改一组文件,然后再将它们推送到 repo...
我正在使用的方法以将提交留在循环中“未推送”的方式工作 所以我需要用-forced标签再次手动推送..

for i in files; do
   edit $i
   git add $i
   git commit  -o $i -n -m "Updated ..."
   git tag $TAG -f
done

exit 0

试图修改以前的提交,但这次也失败了。
有没有办法像我期望的那样推动一切:

如果 pre-push 以 0 退出,则文件被推送...

【问题讨论】:

    标签: git shell repository githooks


    【解决方案1】:

    好的,所以我通过使用别名解决了它:

    git config --global alias.t '!/path/to/above/script'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-18
      • 2021-12-31
      • 1970-01-01
      • 1970-01-01
      • 2015-08-19
      • 2016-08-30
      • 1970-01-01
      • 2018-07-20
      相关资源
      最近更新 更多