(you can do `git show HASH` for each of the hashes in the log, hopefully
find the one that has your work, and then `git checkout HASH` to get back
to it. then give it a name by creating a new branch, merging it, etc.)

On Fri, Oct 23, 2015 at 5:20 PM, Isaiah Norton <[email protected]>
wrote:

> If sounds like you committed to the detached head, and if so, the commit
> should be a few steps back in the reflog: `git reflog`
>
> On Fri, Oct 23, 2015 at 5:14 PM, Douglas Bates <[email protected]> wrote:
>
>> I tagged a new release of one of my packages.  Just to ensure that
>> everything was working as I thought I ran
>>
>> Pkg.free("MyPackage")
>>
>> so I would be sure to be testing on a clean copy of that release.  Of
>> course that meant that my local copy of the package was a detached HEAD.
>>
>> I then edited the code, adding a lot of new capabilities, did a local
>> commit of the files, tried to push these changes, found that I was on a
>> detached HEAD.  At that point I should have started being cautious but I
>> didn't.  I ran
>>
>> Pkg.checkout("MyPackage")
>>
>> and it seems that I have managed to lose all the work I did today.  Is
>> there some way I can get back the changes that I made on the detached HEAD?
>>
>
>

Reply via email to