Re: [RFC] Introduce .git/BRANCH to point to the current branch
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Dec 4, 2007, 20:42 UTC
- Message-ID
- <m34peyur8r.fsf@roke.D-201>
- In-Reply-To
- <vpqbq96jjrf.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 5 quoted lines
> Salikh Zakirov <salikh@gmail.com> writes: > > > This combination leads to the confusing user experience > > if the branch changes independently of the working directory. > > This can happen in following cases:
All those cases are cases of not recommended workflows.
Please search the archives for idea of BASE extension to index (instead of your separate file under .git/refs), and why it is not in current git.
BTW. how in your proposal would you detach HEAD?
Show 11 quoted lines
> There's another thing that your proposal could change: navigating back > in history without loosing track of the branch you're on. > > Currently, I can do: > > # Oh, what did this look like two commits ago? > $ git checkout HEAD^^ > # Ah, OK, let's go back to the tip > $ git checkout branch-name > ^^^^^^^^^^^ > But I have to remember and re-type the branch name.
No, you don't have. You can use
$ git checkout ORIG_HEAD
or
$ git checkout HEAD@{1}-- Jakub Narebski ShadeHawk on #git Poland