Add list all git aliases

This commit is contained in:
Diogo Lemos 2017-02-22 17:26:38 +00:00
parent edeed06cc0
commit 7d8adcb407
2 changed files with 16 additions and 0 deletions

View File

@ -158,6 +158,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [Generates a summary of pending changes](#generates-a-summary-of-pending-changes)
* [List references in a remote repository](#list-references-in-a-remote-repository)
* [Backup untracked files.](#backup-untracked-files)
* [List all git aliases](#list-all-git-aliases)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -1087,5 +1088,16 @@ git ls-remote git://git.kernel.org/pub/scm/git/git.git
git ls-files --others -i --exclude-standard | xargs zip untracked.zip
```
## List all git aliases
```sh
git config -l | grep alias | sed 's/^alias\.//g'
```
__Alternatives:__
```sh
git config -l | grep alias | cut -d '.' -f 2
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -466,4 +466,8 @@
}, {
"title": "Backup untracked files.",
"tip": "git ls-files --others -i --exclude-standard | xargs zip untracked.zip"
}, {
"title": "List all git aliases",
"tip": "git config -l | grep alias | sed 's/^alias\\.//g'",
"alternatives": ["git config -l | grep alias | cut -d '.' -f 2"]
}]