Git Aliases Generator
Useful git aliases (st, co, br, lg, undo, save, wip, amend, hist) ready to paste into .gitconfig.
—
The Git shortcuts worth memorising
The alias section of a gitconfig swaps long commands for two or three letters. The gain is not typing less — it is making a command cheap that you would otherwise avoid because it is long. The clear case is the graph log: nobody types log with four options every time, but everybody types lg.
Tick the shortcuts you want and the page assembles the block ready to paste into the config file. The selection covers the ones appearing in almost every shared setup: compact status, checkout, branch, the graph log with all refs, undoing the last commit while keeping the changes, stashing, a work-in-progress commit and amending the previous commit without opening an editor.
It pays to understand each one before adopting it. The undo here is a soft reset, which drops the commit and leaves everything staged — nothing is lost. The amend rewrites the previous commit, which is safe on what has not been pushed and troublesome on what has, because it changes the hash and forces a push with overwrite. The global file lives at ~/.gitconfig; to apply it to one repository only, the same block goes in .git/config.
Frequently asked questions
Can an alias call something that is not a Git command?
Can I override an existing command?
How do I see the aliases I already have?
Related Tools
Bash/Zsh Aliases Generator
Predefined list of useful aliases (ll, la, gs, gd, gco, mkcd, ip) ready to paste into .bashrc or .zshrc.
NGINX server block Generator
Build an NGINX server block: server_name, listen, root, index, location / try_files, gzip and logs. Starter config ready.
tsconfig.json Generator
Generate a custom tsconfig.json: ES target, module, strict, paths, JSX, declaration and more. Validation against invalid options. Everything in your browser.
tsconfig Base Generator
Generate a basic tsconfig.json for JS-to-TS migration.
Storybook main.js Generator
Generate the .storybook/main.js for Storybook 7+ with React and Vite, ready to use. Copy the config and start documenting your components in minutes.
.mailmap (Git) Generator
Map inconsistent names and emails to a single author in Git, improving stats and shortlog. Official format.