shallow&single-branch clone?

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

 



Hi there,

it seems like there is no way to clone a single branch with truncated history.

Truncating history is done by 'git clone --depth 1', there is not way to restrict 'clone' to a single branch (the --branch option still downloads all branches and only then chooses something other than HEAD as active branch).

The manual sequence
	git init
	git remote add -t master -f origin URL
	git checkout
allows a clone of a single branch but offers no means to truncate history.

The least intrusive solution would be an additional option to clone, perhaps '--branch-only'.

More user friendly, this options should be on by default when --depth is set. After all: who would expect branches to be cloned when the history is explicitely truncated?

Ideas?

Greetings,
Norbert Nemec
--
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]