Re: Missing features in git

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

 



linux@xxxxxxxxxxx wrote:
>
> Personally, I'd prefer if the requirement that HEAD point to
> refs/heads were enforced when checking in rather than checking out.
>   
> Then you could check out an arbitrary version without any of the annoyance
> above; I could "git checkout tags/foo" or even "git checkout deadbeef~3".
> I wouldn't be on a current branch (which would necessitate changing
> "git branch" output), so HEAD would simply contain an object ID directly
> rather than being a symlink/symref.

I wholeheartedly agree.  For the casual user it's IMHO the most
annoying behaviour of git that you can't simply checkout an arbitrary
commit without creating a new (most of the time temporary) branch first.
Often you don't plan to change the checked out tree and giving it a
new branch name ahead is cumbersome, especially as you know that you'll
never commit into it and have to delete the branch before checking out
another tag.  I would prefer this behaviour:

	$ git checkout v2.6.16
	... i.e. check whether it builds
	$ git checkout v2.6.17
	... test this one
	$ git checkout v2.6.18
	... change something
	$ git commit
	error: can't commit.  not on any branch.
	use "git commit -b <new-branch-name>" to commit into a new one.
	$ git commit -b my-v2.6.18

Ciao, ET.
-
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]