need more understanding on gitblit groovy push script

I have below 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.;

My requirement: want to push only changes from one gitinstance to other

  • Cleaning after git merge --no-ff
  • How can I generate/apply git patches only for commits that alter specific files
  • Move uncomitted changes from master to branch
  • Syncing sftp file system with version control
  • Eclipse luna - Internal error, trying to import from git
  • Webmatrix thinks i'm my alt on github
  • 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 ?

  • Why after git rebase should do : git add?
  • Git branch not working the way I expected it to
  • How do I execute a Capistrano task locally?
  • Proper git etiquette for users working in mostly-isolated branches?
  • Is git's implementation of the patience diff algorithm correct?
  • How can I get multiple Jenkins builds to work from one local git repo?
  • 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. – James Moger

    setPushAll will push all branches from the source to the target. This is also probably what you want. – James Moger

    you can lookup in the man-page (or docs) of git-push – cfrick

    Git Baby is a git and github fan, let's start git clone.