Re: Missing features in git
- From
- Edgar 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