Re: [git] how to check remote git repo for updates without pull/fetch

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

 



> does exist some way to check remote git repository for updates without downloading any essential files?
Well, actually, I think, that I've found one of possible soulution already:
First, check remote repo:
$ git ls-remote /path/to/git/repo
<some sha1-hash>	HEAD
...
Then check local repo:
$ cat .git/HEAD
ref: refs/heads/master
$ cat .git/refs/heads/master
<other sha1-hash>
So, if both hashes identical, then current working tree with HEAD, which points to "master", already up-to-dated,
but if they don't, then there is some updates at remote repo.


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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