Skip to content

Commit 39c7902

Browse files
authored
Merge pull request #137 from dmlemos/list_git_aliases
Add list all git aliases
2 parents edeed06 + 7d8adcb commit 39c7902

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
158158
* [Generates a summary of pending changes](#generates-a-summary-of-pending-changes)
159159
* [List references in a remote repository](#list-references-in-a-remote-repository)
160160
* [Backup untracked files.](#backup-untracked-files)
161+
* [List all git aliases](#list-all-git-aliases)
161162

162163
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
163164
<!-- @doxie.inject end toc -->
@@ -1087,5 +1088,16 @@ git ls-remote git://git.kernel.org/pub/scm/git/git.git
10871088
git ls-files --others -i --exclude-standard | xargs zip untracked.zip
10881089
```
10891090
1091+
## List all git aliases
1092+
```sh
1093+
git config -l | grep alias | sed 's/^alias\.//g'
1094+
```
1095+
1096+
1097+
__Alternatives:__
1098+
```sh
1099+
git config -l | grep alias | cut -d '.' -f 2
1100+
```
1101+
10901102
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
10911103
<!-- @doxie.inject end -->

tips.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,4 +466,8 @@
466466
}, {
467467
"title": "Backup untracked files.",
468468
"tip": "git ls-files --others -i --exclude-standard | xargs zip untracked.zip"
469+
}, {
470+
"title": "List all git aliases",
471+
"tip": "git config -l | grep alias | sed 's/^alias\\.//g'",
472+
"alternatives": ["git config -l | grep alias | cut -d '.' -f 2"]
469473
}]

0 commit comments

Comments
 (0)