git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Missing features in git

From
ETEdgar Toernig <froese@gmx.de>
Date
Nov 14, 2006, 18:55 UTC
Message-ID
<20061114195559.40967ee4.froese@gmx.de>
In-Reply-To
<20061114134958.5326.qmail@science.horizon.com>
linux@horizon.com wrote:
Show 9 quoted lines
>
> 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
Next: linux@horizon.com
Message 1 of 4 in “Re: Missing features in git”
  1. Edgar ToernigNov 14, 2006
  2. linux@horizon.comNov 14, 2006
  3. Karl HasselströmNov 15, 2006
  4. Linus TorvaldsNov 15, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.