mirror of
https://github.com/tiimgreen/github-cheat-sheet.git
synced 2025-08-08 08:56:35 +02:00
Add Git alias for logs
This commit is contained in:
@@ -721,6 +721,7 @@ $ git config --global alias.ac 'add -A . && commit'
|
||||
| `git tags` | `git tag -l` | `git config --global alias.tags 'tag -l'` |
|
||||
| `git branches` | `git branch -a` | `git config --global alias.branches 'branch -a'` |
|
||||
| `git remotes` | `git remote -v` | `git config --global alias.remotes 'remote -v'` |
|
||||
| `git lg` | `git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --` | `git config --global alias.lg 'log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --'` |
|
||||
|
||||
#### コマンドの自動修正
|
||||
多分今は`git comit`とタイプした場合、以下のような出力を得ることだろう:
|
||||
|
@@ -773,6 +773,7 @@ $ git config --global alias.ac 'add -A . && commit'
|
||||
| `git tags` | `git tag -l` | `git config --global alias.tags 'tag -l'` |
|
||||
| `git branches` | `git branch -a` | `git config --global alias.branches 'branch -a'` |
|
||||
| `git remotes` | `git remote -v` | `git config --global alias.remotes 'remote -v'` |
|
||||
| `git lg` | `git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --` | `git config --global alias.lg 'log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --'` |
|
||||
|
||||
#### Auto-correct
|
||||
|
||||
|
@@ -718,6 +718,7 @@ Some useful aliases include:
|
||||
| `git tags` | `git tag -l` | `git config --global alias.tags 'tag -l'` |
|
||||
| `git branches` | `git branch -a` | `git config --global alias.branches 'branch -a'` |
|
||||
| `git remotes` | `git remote -v` | `git config --global alias.remotes 'remote -v'` |
|
||||
| `git lg` | `git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --` | `git config --global alias.lg 'log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --'` |
|
||||
|
||||
#### Auto-Correct
|
||||
If you type `git comit` you will get this:
|
||||
|
@@ -704,6 +704,7 @@ $ git config --global alias.ac 'add -A . && commit'
|
||||
| `git tags` | `git tag -l` | `git config --global alias.tags 'tag -l'` |
|
||||
| `git branches` | `git branch -a` | `git config --global alias.branches 'branch -a'` |
|
||||
| `git remotes` | `git remote -v` | `git config --global alias.remotes 'remote -v'` |
|
||||
| `git lg` | `git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --` | `git config --global alias.lg 'log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --'` |
|
||||
|
||||
#### 自动更正
|
||||
如果键入 `git comit` 你会看到如下输出:
|
||||
|
Reference in New Issue
Block a user