git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
IZIvan Zorin <ivan.a.zorin@gmail.com>
Date
Dec 19, 2008, 16:39 UTC
Message-ID
<494BCE37.1080204@gmail.com>
In-Reply-To
<494BC89F.9070107@gmail.com>
> 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.

Previous: Shawn O. PearceNext: James Cloos
Message 3 of 7 in “how to check remote git repo for updates without pull/fetch”
  1. Ivan ZorinDec 19, 2008
  2. Shawn O. PearceDec 19, 2008
  3. Ivan ZorinDec 19, 2008
  4. James CloosDec 20, 2008
  5. David AguilarDec 20, 2008
  6. Boyd Stephen Smith Jr.Dec 21, 2008
  7. James CloosDec 21, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.