Rescue lost commits with reflog

Show the last 20 HEAD moves, including that rebase you regret

git reflog show --date=relative | head -20

tool
git45 commands
tags
gitdebug

More git commands

  • git stash push -m 'WIP: feature-x' -u

    Save uncommitted work, including untracked files, under a clear label

  • git stash pop stash@{2}

    Apply a specific stash entry and remove it from the list

  • git bisect start && git bisect bad HEAD && git bisect good <good-sha>

    Run a binary search through history to find where a regression started

  • git worktree add ../feature-branch feature/my-feature

    Check out a branch in a separate directory, no stash needed

  • git submodule update --init --recursive

    Initialize and update all submodules, including nested ones

all 45 git commands