git-alias(1)

git-alias1

Define, search and show aliases

Usage

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>

Overview

List all aliases, show one alias, or set one (global or local) alias.

Options

--global

Show or create alias in the system config

--local

Show or create alias in the repository config

<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>

Releases

7 releases since Debian 7 (Wheezy); the text changed 6 times.

  1. 7
  2. 8
  3. 9
  4. 10
  5. 11
  6. 12
  7. 13

Author

Written by Jonhnny Weslley <[email protected]>

Reporting bugs

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

From git-extras 7.3.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.