Re: Cloning a remote tag without using git-fetch-pack directly?

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

 



On Wed, Apr 20, 2011 at 12:27:20AM -0700, Josh Triplett wrote:

> Sadly, though, I still can't check out the result:
> 
> /tmp/linux-2.6$ git checkout FETCH_HEAD
> fatal: Cannot switch branch to a non-commit.
> (128) /tmp/linux-2.6$ git checkout -b master FETCH_HEAD
> fatal: Cannot switch branch to a non-commit.
> 
> I guess I'd hoped for something similar to "detached HEAD" mode.

No, it wouldn't make any sense to have a non-commit in HEAD, detached or
otherwise, since you couldn't build commits on top of it (what would the
new commit's parent pointer have in it?).

If you just want to check the files out into the working tree, you can
do:

  git read-tree --reset -u FETCH_HEAD

But I'm not really clear on what you're trying to accomplish with all of
this. If you can describe your ultimate goal, I might be able to help
more.

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