need more understanding on gitblit groovy push script
I have below
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 : Is this going to push all repository data all time script executed or just commied changes(I want change only)?
push.setForce(true) : What is use of this ? Should I use it in my case ?
One Solution collect form web for “need more understanding on gitblit groovy push script”
Got answer what I want to know As in comment
Git only pushes what is not in the target
setForce(true) will override references in the target repo with the references in the source repo. For your situation this is probably what you want. –
setPushAll will push all branches from the source to the target. This is also probably what you want. –
you can lookup in the man-page (or docs) of git-push –