[dgplug-users] Recovering commit after git reset --hard - A blog

Abhilash Raj maxking at asynchronous.in
Fri Apr 6 11:14:49 PDT 2018


On Mon, Mar 26, 2018, at 4:30 AM, Shashank Kumar wrote:
> Hello folks,
> 
> I hope you had a nice weekend. I for one struggled with one of my
> projects which I had to present last week in college and made some
> horrible choices with Git. I wrote my experience in a blog[0] and I hope
> it would be informative for the folks facing the same problem. Reviews
> and suggestions are always welcome. Thanks :)

Great post!

I'd suggest a `git cherry-pick <commit_hash>` as compared to `git reset --hard ...` again to recover the commit once you know the commit id just to make sure that you don't blow up anything else while trying to retrieve the lost commit.

-- 
  Abhilash Raj
  maxking at asynchronous.in


More information about the Users mailing list