3 ms·
I recently discovered the magical incantation: gitk --all $( git fsck --no-reflog | awk '/dangling commit/ {print $3}' ) which show's all the git commits
by rjmunro 10y ago
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 https://github.com/gitx/gitx/issues/78
Source: http://stackoverflow.com/a/91795/3408 http://stackoverflow.com/a/91795/3408
- mdns33 10y agohave u heard about tig? try it