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

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

 



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
--
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