Reflog — rescue lost commits

Show recent HEAD movements including rebases and resets

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) with a label

  • git stash pop stash@{2}

    Apply and drop a specific stash entry

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

    Binary search through history to find a regression

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

    Check out a branch in a parallel directory without stashing

  • git submodule update --init --recursive

    Initialize and update all submodules recursively

all 45 git commands