diff --git a/README.md b/README.md index 98d158f..a06300d 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Prunes references to remote branches that have been deleted in the remote.](#prunes-references-to-remote-branches-that-have-been-deleted-in-the-remote) * [Retrieve the commit hash of the initial revision.](#retrieve-the-commit-hash-of-the-initial-revision) * [Visualize the version tree.](#visualize-the-version-tree) +* [Visualize the tree including commits that are only referenced from reflogs](#visualize-the-tree-including-commits-that-are-only-referenced-from-reflogs) * [Deploying git tracked subfolder to gh-pages](#deploying-git-tracked-subfolder-to-gh-pages) * [Adding a project to repo using subtree](#adding-a-project-to-repo-using-subtree) * [Get latest changes in your repo for a linked project using subtree](#get-latest-changes-in-your-repo-for-a-linked-project-using-subtree) @@ -672,6 +673,11 @@ gitk --all git log --graph --pretty=format:'%C(auto) %h | %s | %an | %ar%d' ``` +## Visualize the tree including commits that are only referenced from reflogs +```sh +git log --graph --decorate --oneline $(git rev-list --walk-reflogs --all) +``` + ## Deploying git tracked subfolder to gh-pages ```sh git subtree push --prefix subfolder_name origin gh-pages diff --git a/tips.json b/tips.json index 43accfe..9909931 100644 --- a/tips.json +++ b/tips.json @@ -220,6 +220,9 @@ "title": "Visualize the version tree.", "tip": "git log --pretty=oneline --graph --decorate --all", "alternatives": ["gitk --all", "git log --graph --pretty=format:'%C(auto) %h | %s | %an | %ar%d'"] + }, { + "title": "Visualize the tree including commits that are only referenced from reflogs", + "tip": "git log --graph --decorate --oneline $(git rev-list --walk-reflogs --all)" }, { "title": "Deploying git tracked subfolder to gh-pages", "tip": "git subtree push --prefix subfolder_name origin gh-pages",