需要更多地了解 gitblit groovy 推送脚本
need more understanding on gitblit groovy push script
我有以下groovy script
PushCommand push=git.push();
push.setRemote("my remote");
push.setPushAll(); //Push all branches under refs/heads/*.
push.setForce(true); //Sets the force preference for push operation.
push.call();
我的要求:want to push only changes from one gitinstance to other
setPushAll
: 这是否会在脚本执行时推送所有存储库数据,或者只是提交更改(我只想更改)?
push.setForce(true)
:这个有什么用?我应该在我的案例中使用它吗?
得到了我想知道的答案如评论
Git only pushes what is not in the target
setForce(true)
将用源仓库中的引用覆盖目标仓库中的引用。对于您的情况,这可能就是您想要的。 – James Moger
setPushAll
会将所有分支从源推送到目标。这也可能是你想要的。 – James Moger
您可以在 git-push - cfrick
的手册页(或文档)中查找
我有以下groovy script
PushCommand push=git.push();
push.setRemote("my remote");
push.setPushAll(); //Push all branches under refs/heads/*.
push.setForce(true); //Sets the force preference for push operation.
push.call();
我的要求:want to push only changes from one gitinstance to other
setPushAll
: 这是否会在脚本执行时推送所有存储库数据,或者只是提交更改(我只想更改)?
push.setForce(true)
:这个有什么用?我应该在我的案例中使用它吗?
得到了我想知道的答案如评论
Git only pushes what is not in the target
setForce(true)
将用源仓库中的引用覆盖目标仓库中的引用。对于您的情况,这可能就是您想要的。 – James Moger
setPushAll
会将所有分支从源推送到目标。这也可能是你想要的。 – James Moger
您可以在 git-push - cfrick