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

"warning: no common commits" triggered due to change of remote's IP address?

From
Brent Goodrick <bgoodr@gmail.com>
Date
Mar 1, 2009, 18:01 UTC
Message-ID
<e38bce640903011001p2d705707o9f7145ab5ab68929@mail.gmail.com>
Hi,
I had this setup in my .git/config on my satellite machine:
[remote "origin"]
	url = 192.168.2.3:git.repos/environ.git
	fetch = +refs/heads/home:refs/remotes/origin/home

192.168.2.3 is the IP address of the main machine and repo, and is internal to my LAN at home. My workflow is fairly simple: At home, on my internal LAN, I usually update via these commands:

  git fetch
  git branch # <-- verify I am on the "home" branch
  git merge origin/home  # <-- merge origin/home into home and fix conflicts

I needed to do a git fetch of that same repository while out at an Internet cafe (via ssh). I know ahead of time that I might have had a couple of files out of date between my satellite machines repo and my origin repo, but certainly not megabytes of data in difference. I want to pull those differences to the satellite machines repo to continue to work.

On the satellite machine, I simply did the fetch manually by changing the IP address to be the WAN internet IP address of my ssh daemon I'm running at home:

  gitw fetch 88.99.100.101:git.repos/environ.git
+refs/heads/home:refs/remotes/origin/home

My expectation at this point is that, since I've changed only the IP address, and kept everything else the same, git should be smart enough to compare SHA1 values only and not download the entire remote repo just to do that comparison.

But I was quite surprised to find that it was pulling down tons of data:
  warning: no common commits
  remote: Counting objects: 2473, done.
  remote: Compressing objects: 100% (2199/2199), done.
  Receiving objects:  83% (2077/2473), 66.58 MiB | 67 KiB/s     C-c C-c

At this point, for some reason I can't explain, the network got very slow (network bandwidth limiting?). So, I terminated the git fetch (the C-c C-c above), thinking that I can repair this when I get back to my LAN.

So my questions are:
 1. Will terminating the git fetch like I did leave the satellite repo
    in an inconsistent state? If so, is my only choice to start
    a new repo from scratch on the satellite machine, or is there some
    repair mechanism?
 2. Why did git conclude that there was no common commits?

Thanks, Brent

Next: Thomas Rast
Message 1 of 6 in “"warning: no common commits" triggered due to change of remote's IP address?”
  1. Brent GoodrickMar 1, 2009
  2. Thomas RastMar 1, 2009
  3. Brent GoodrickMar 1, 2009
  4. Thomas RastMar 2, 2009
  5. Thomas RastMar 2, 2009
  6. Brent GoodrickMar 2, 2009

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.