Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I recently discovered the magical incantation:

    gitk --all $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )
which show's all the git commits in the repository, even those that are not on any branches any more.

It's perfect if you need to find an old commit to undo a rebase, or if you accidentally deleted a branch. It really should be a button in GUIs called "show all commits" or something". I even posted a bug in gitx suggesting they add the feature: https://github.com/gitx/gitx/issues/78

Source: http://stackoverflow.com/a/91795/3408



have u heard about tig? try it




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

Search: