GIT-ALIAS(1)

πŸ’– GIT-ALIAS(1) β€” the git-alias page, git-extras edition πŸ’–

okay bestie, buckle up, we're doing the git-alias manual page and it's actually so useful it's unreal 🫢


✨ NAME ✨

git-alias β€” define, search and show aliases πŸ’…

✨ SYNOPSIS ✨

git-alias
git-alias <search-pattern>
git-alias <alias-name> <command>
git-alias [--global]
git-alias [--local]
git-alias [--global] <search-pattern>
git-alias [--local] <search-pattern>
git-alias [--global] <alias-name> <command>
git-alias [--local] <alias-name> <command>

✨ DESCRIPTION ✨

So basically: list all your aliases, show off one single alias, or set one (global or local) alias. That's the whole vibe. One command, three moods. 🌸

✨ OPTIONS ✨

  • --global β€” show or create the alias in the system config πŸ‘‘ (the big-picture, everywhere-all-the-time one)
  • --local β€” show or create the alias in the repository config πŸŽ€ (just this repo, just this vibe)
  • <search-pattern> β€” the pattern used to search aliases πŸ”
  • <alias-name> β€” the name of the alias to create ✨
  • <command> β€” the command for which you are creating an alias πŸ’«

✨ EXAMPLES ✨

🌈 Defining a new alias

$ git alias last "cat-file commit HEAD"

πŸ” Searching with one argument

Providing only one argument, git-alias searches for aliases matching the given value:

$ git alias ^la
last = cat-file commit HEAD

πŸ’– Showing everything

git-alias will show all aliases if no argument is given:

$ git alias
s = status
amend = commit --amend
rank = shortlog -sn --no-merges
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
whois = !sh -c 'git log -i -1 --pretty="format:%an <%ae>

(yes that last line is exactly as long as it is in the source, no cap, we do not edit the sacred text πŸ’€)

✨ AUTHOR ✨

Written by Jonhnny Weslley <jw@jonhnnyweslley.net> 🌟

✨ REPORTING BUGS ✨

<https://github.com/tj/git-extras/issues>

✨ SEE ALSO ✨

<https://github.com/tj/git-extras>


and that's the whole page, bestie πŸ¦‹ thank you for coming to my ted talk. this one's from Git Extras, dated May 2026 β€” periodt, go make some aliases, you're gonna slay πŸ’œβœ¨

πŸ“¦ where this page comes from