git-alias - Man Page
Define, search and show aliases
Examples (TL;DR)
- List all aliases:
git alias
- Create a new alias:
git alias "name" "command"
- Search for an existing alias:
git alias ^name
Synopsis
git-alias
git-alias <search-pattern>
git-alias <alias-name> <command>
Description
List all aliases, show one alias, or set one (global) alias.
Options
<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"
Providing only one argument, git-alias searches for aliases matching the given value:
$ git alias ^la last = cat-file commit HEAD
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>
Author
Written by Jonhnny Weslley <jw@jonhnnyweslley.net>
Reporting Bugs
See Also
Referenced By
August 2021 Git Extras