Possible to update-ref remote repository?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello -

Wondering if it's possible to do the equivalent of the update-ref
command remotely.  Or I guess another way of putting it would be to
git-push to a remote repository without needing a local clone of the
repo.

Trying do something like:

git push <remote-repo-url>  <sha1>:refs/heads/mybranchtoupdate

where I know that <sha1> already exists on the remote.  I'd like to
avoid the need to clone a local copy of the repo.  Wondering if there
might be some plumbing command(s) that could accomplish this?

Regards,
Jesse

P.S. I think think a minimal way to do this using git push would be:

git init
git remote add origin <remote-repo-url>
git fetch origin <sha1>:refs/heads/mybranchtoupdate
git push origin refs/heads/mybranchtoupdate:refs/heads/mybranchtoupdate

Seems that if it's known that <sha1> already exists on the remote, the
fetch is unnecessary network overhead?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux