Skip to content

Instantly share code, notes, and snippets.

View Shaglock's full-sized avatar
🏠
Working from home

Ilya Shaplyko Shaglock

🏠
Working from home
View GitHub Profile
@Shaglock
Shaglock / README.md
Created March 22, 2022 08:45 — forked from jherax/README.md
Git Alias and Rebase

Git Alias and Git Rebase

WHEN TO DO REBASE

After each commit in our branch, in order to be up-to-date with the integration branch.

@Shaglock
Shaglock / stash_dropped.md
Created May 14, 2019 20:50 — forked from joseluisq/stash_dropped.md
How to recover a dropped stash in Git?

How to recover a dropped stash in Git?

1. Find the stash commits:

git log --graph --oneline --decorate ( git fsck --no-reflog | awk '/dangling commit/ {print $3}' )

This will show you all the commits at the tips of your commit graph which are no longer referenced from any branch or tag – every lost commit, including every stash commit you’ve ever created, will be somewhere in that graph.