The Git Extensions repository browser seems to be more versatile than gitk in many ways.

enter image description here

However, my very favorite command line option for gitk is --all. gitk --all shows all commits, including ones not reachable by any branch or tag. This is very useful for understanding what actually happens in git. For instance after a rebase you can still see the original commits that have been copied and abandoned (and even return to them with reset).

enter image description here

Is there any way to make Git Extensions browser behave like gitk --all and show even unreachable commits?

有帮助吗?

解决方案

At the risk of stating the now-obvious, as of 2018's 2.51.RC2 release and newer, commits that can be reached via the reflog can now be displayed in Git Extensions. I'm not sure if this is exactly the same as gitk --all, but it does display many additional commits that are otherwise unreachable.

It appears to use git log --reflog behind the scenes.

The pull request is here, and it was released with 2.51.RC2.

Image of the "Show reflog references" option in the View menu in Git Extensions

其他提示

The answer to your question is no. However, you can open gitk --all, with a little work.

If you're willing to sacrifice performance, you can get some more information by changing the following in Settings > Settings > Git extensions > Performance. Check "show current working changes in revision graph". I've left that off and ended up using the Hotkeys settings tab.

  • Hotkeys > RevisionGrid. Make sure "ShowAllBranches" has a shortcut key. It usually is Ctrl+Shift+A.
  • Hotkeys > Browse. Make sure GitGitK has a shortcut key. I've used Ctrl+K. It brings up gitk from inside Git Extensions. However, you then have to view all branches manually, so I'm not sure how useful you'll find it on its own.
  • Finally, I think the one you'll really like is the Scripts tab. You will need to manually add a Gitk --all script there, but then you can assign a hotkey to it. You then have gitk --all from inside Git Extensions.

Have fun :)

Apparently, there is also a feature request that is 3 months old for precisely this ;)

Are you referring to something like "git reflog". That should show all of your commits that have been made, even if you accidentally do a reset later and lose previous commits. You can recover "lost" commits that way. I don't believe their is button in GIT extensions to show that information.

You usually have to do a git reflog in the command line to find the commit hash, then check out a branch with that hash. I have used that for recovering commits with merges gone bad before.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top