Re: cloning empty repo

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

 



"Marijn Schouten (hkBst)" <hkBst@xxxxxxxxxx> wrote:
> is there any reason why cloning an empty repository should result in an error
> instead of a succesfully cloned empty repo?

There's nothing to clone.  The repository is empty.

If you create a Git repository using `git init` and then create
another one also using `git init` then both repositories are empty,
and an empty repository is identical to every other empty repository.

So if you want to setup an empty repository and then clone nothing,
you actually can just setup another empty repository and configure
the 'origin' remote:

	mkdir a; cd a; git init; cd ..

	mkdir b; cd b; git init
	# now a and b are identical

	git remote add origin ../a/.git
	# now b is a "clone" of a's nothingness...

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