Push objects and refs from the local repository to the remote one.
This is a utility function providing standard push behavior. It updates remote refs and send there necessary objects according to remote ref update specification. After successful remote ref update, associated locally stored tracking branch is updated if set up accordingly. Detailed operation result is provided after execution.
For setting up remote ref update specification from ref spec, see helper method {@link #findRemoteRefUpdatesFor(Collection)}, predefined refspecs ( {@link #REFSPEC_TAGS}, {@link #REFSPEC_PUSH_ALL}) or consider using directly {@link RemoteRefUpdate} for more possibilities.
When {@link #isDryRun()} is true, result of this operation is justestimation of real operation result, no real action is performed.
@see RemoteRefUpdate
@param monitor progress monitor to inform the user about our processing activity. Must not be null. Use {@link NullProgressMonitor} ifprogress updates are not interesting or necessary.
@param toPush specification of refs to push. May be null or the empty collection to use the specifications from the RemoteConfig converted by {@link #findRemoteRefUpdatesFor(Collection)}. No more than 1 RemoteRefUpdate with the same remoteName is allowed. These objects are modified during this call.
@return information about results of remote refs updates, tracking refsupdates and refs advertised by remote repository.
@throws NotSupportedException this transport implementation does not support pushing objects.
@throws TransportException the remote connection could not be established or object copying (if necessary) failed at I/O or protocol level or update specification was incorrect.