Quantcast
Channel: Get a list of all Git commits, including the 'lost' ones - Stack Overflow
Browsing latest articles
Browse All 13 View Live

Answer by Marco Luzzara for Get a list of all Git commits, including the...

Actually git fsck can be used to find all the lost commits, you just need the right option:git fsck --unreachable --no-reflogs--unreachable alone is not enough because some commits might still be...

View Article



Answer by sultanmyrza for Get a list of all Git commits, including the 'lost'...

git log --reflogsaved me! I lost mine while merging HEAD and could not find my lates commit! Not showing in source tree but git log --reflog show all my local commits before

View Article

Image may be NSFW.
Clik here to view.

Answer by Sonhja for Get a list of all Git commits, including the 'lost' ones

What saved my life was the following command:git reflogThere you find a screen with history commits done to git like this one:At this point, you only have to find the HEAD@{X} that you need, create a...

View Article

Answer by Zdovc for Get a list of all Git commits, including the 'lost' ones

If you use Git Extensions GUI it can show you a graphical visualization of dangling commits if you check "View -> Show reflog references".This will show dangling commits in the tree, just like all...

View Article

Answer by yakoda for Get a list of all Git commits, including the 'lost' ones

@bsimmonsgit fsck --lost-found | grep commitThen create a branch for each one: $ git fsck --lost-found | grep commitChecking object directories: 100% (256/256), done.dangling commit...

View Article


Answer by kenorb for Get a list of all Git commits, including the 'lost' ones

Try:git log --reflogwhich lists all git commits by pretending that all objects mentioned by reflogs (git reflog) are listed on the command line as <commit>.

View Article

Answer by Florian F for Get a list of all Git commits, including the 'lost' ones

Like @Kieran 's Answer, but for the console:git log --oneline --all --graph --decorate $(git reflog | awk '{print $1}')

View Article

Answer by bsimmons for Get a list of all Git commits, including the 'lost' ones

How I solve this problem? Use git fsck and logging!First create a file containing lost (unreachable) commits and blobs. (NOTE: if you did something like git gc then it will garbage collect all of they...

View Article


Answer by Kieran for Get a list of all Git commits, including the 'lost' ones

When I tackle this issue I use the following command:git reflog | awk '{ print $1 }' | xargs gitkThis lets me visualise recent commits which have become headless.I have this wrapped up in a script...

View Article


Answer by Vinod Joshi for Get a list of all Git commits, including the 'lost'...

We'll git log sometimes is not good to get all commits detail, so to view this...For Mac: Get into you git project and type:$ nano .git/logs/HEADto view you all commits in that, or:$ gedit...

View Article

Answer by GameScripting for Get a list of all Git commits, including the...

I've had luck recovering the commit by looking at the reflog, which was located at .git/logs/HEADI then had to scoll down to the end of the file, and I found the commit I just lost.

View Article

Answer by araqnid for Get a list of all Git commits, including the 'lost' ones

Not particularly easily- if you've lost the pointer to the tip of a branch, it's rather like finding a needle in a haystack. You can find all the commits that don't appear to be referenced any more-...

View Article

Get a list of all Git commits, including the 'lost' ones

Let's say that I have a graph like this:A---B---C---D (master) \ \-E---F (HEAD)If I do git log --all --oneline, I will get all six of my commits.But if the graph is:A---B---C---D (master, HEAD) \...

View Article

Browsing latest articles
Browse All 13 View Live




Latest Images