File: git-alias.md

package info (click to toggle)
git-extras 7.3.0-1
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 1,988 kB
  • sloc: sh: 4,235; python: 634; makefile: 146
file content (73 lines) | stat: -rw-r--r-- 1,619 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
git-alias(1) -- Define, search and show aliases
===============================================

## SYNOPSIS

`git-alias` <br>
`git-alias` &lt;search-pattern&gt; <br>
`git-alias` &lt;alias-name&gt; &lt;command&gt; <br>
`git-alias` [--global] <br>
`git-alias` [--local] <br>
`git-alias` [--global] &lt;search-pattern&gt; <br>
`git-alias` [--local] &lt;search-pattern&gt; <br>
`git-alias` [--global] &lt;alias-name&gt; &lt;command&gt; <br>
`git-alias` [--local] &lt;alias-name&gt; &lt;command&gt; <br>

## DESCRIPTION

  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

  &lt;search-pattern&gt;

  The pattern used to search aliases.

  &lt;alias-name&gt;

  The name of the alias to create.

  &lt;command&gt;

  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 &lt;<jw@jonhnnyweslley.net>&gt;

## REPORTING BUGS

&lt;<https://github.com/tj/git-extras/issues>&gt;

## SEE ALSO

&lt;<https://github.com/tj/git-extras>&gt;