Re: [PATCH/RFC] Record original ref in detached HEAD

2013-02-26 Thread Duy Nguyen
On Tue, Feb 26, 2013 at 9:37 PM, Matthieu Moy wrote: > Nguyễn Thái Ngọc Duy writes: > >> Many times I checkout a remote branch, or a tag and after a while I >> forget remember what ref I checked it out from. Saving the original >> ref would help (or is it already saved somewhere?). > > It is :-).

Re: [PATCH/RFC] Record original ref in detached HEAD

2013-02-26 Thread Matthieu Moy
Nguyễn Thái Ngọc Duy writes: > Many times I checkout a remote branch, or a tag and after a while I > forget remember what ref I checked it out from. Saving the original > ref would help (or is it already saved somewhere?). It is :-). Try e.g. git checkout --detach git checkout - (analogous

[PATCH/RFC] Record original ref in detached HEAD

2013-02-26 Thread Nguyễn Thái Ngọc Duy
Many times I checkout a remote branch, or a tag and after a while I forget remember what ref I checked it out from. Saving the original ref would help (or is it already saved somewhere?). This exploits the fact that FETCH_HEAD stores extra info after the SHA-1 and at least C Git is prepared to ign