Create a packfile and send it to the server
Connect to the remote if it hasn't been done yet, negotiate with the remote git which objects are missing, create a packfile with the missing objects and send it.
If options are specified and this remote is already connected then the existing remote connection options will be discarded and the remote will now use the new options.
the refspecs to use for this negotiation and upload. Use NULL or an empty array to use the base refspecs
0 or an error code