Aliases map a short name to any Git command (or sequence). Set globally so every repo gets them:
git config --global alias.co checkout
git config --global alias.lg "log --oneline --graph --all"
git config --global alias.undo "reset --soft HEAD~1"
Now git lg shows the graph; git undo rolls back the last commit while keeping its changes staged.
Power settings worth turning on once and forgetting:
git config --global rerere.enabled true — Git remembers how you resolved a conflict and replays the resolution next time the same conflict appears. Huge for repeated rebases.
git config --global pull.rebase true — git pull rebases instead of merging, keeping history linear.
git config --global fetch.prune true — git fetch automatically removes tracking refs for branches deleted on the remote.
git config --global push.autoSetupRemote true — first push of a new branch sets upstream automatically; no more -u.