Re: git refuses to switch to older branches
- From
Junio C Hamano <junkio@cox.net>
- Date
- Aug 20, 2006, 01:34 UTC
- Message-ID
- <7vy7tkyyu9.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <ec84gg$p2l$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
> ... I'm not sure if this is feature or bug that git-checkout > with file specified (path limit specified?) doesn't need -f
This is definitely a feature we deliberately added long after git-checkout was initially written, in reponse to specific requests from users. Back then the only way to revert to index or HEAD was to "checkout-index -f -q -u -a" or "reset --hard" and it was cumbersome to revert only a single path.
I have been wondering if we wanted to be able to say:
git checkout HEAD gitweb/
to revert everything under named hierarchy, but we haven't heard user requests for this. This is way more dangerous than my liking so personally I am happy that we do not have it.