Hacker Newsnew | past | comments | ask | show | jobs | submit | matheusml's commentslogin

Indeed.


Thanks a lot. Updated!


You may want to leave it in. As another user mentioned, the official stable release is still 1.9. It does warn you that the default will change in 2.0, and prompts you to decide whether or not you want to keep "matching" as the default, but the version that most people will be working on won't have "simple" set as default yet.


It was 'git reset --HARD <commit-id>', like a cherry pick, before pushing.


Even with --hard, the commit isn't lost. Commits are not immediately removed from the repository, only when git runs the garbage collection. Try it: create a test commit, make a note of its hash, reset to HEAD~1 and then reset again to that hash.

When you do this by mistake and you don't know the hash you can find it using git reflog, which logs everything that happens in the repository.

More detailed: http://gitready.com/intermediate/2009/02/09/reflog-your-safe...


If it was "before pushing" that means the commit has been made, and thus isn't lost (but accessible via the reflog.)


  git reflog
Might be your saviour here next time.


I'll update the post. This worked for me. Thanks a lot!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: