Git 小伎俩
status
category
date
summary
slug
icon
tags
password
记录一下 Git 快捷命令,以及装机必备的 Git 插件。
Oh-My-Zsh
Shortcut | Alias |
g | git |
gst | git status |
ga | git add |
gc | git commit -v |
gca | git commit -v -a |
gca! | git commit -v -a –amend |
gd | git diff |
gdca | git diff –cached |
gl | git pull |
gp | git push |
grb | git rebase |
grbc | git rebase –continue |
grba | git rebase –abort |
gup | git fetch && git rebase |
gfo | git fetch origin |
gco | git checkout |
gb | git branch |
gcp | git cherry-pick |
glg | git log –stat |
gsta | git stash save |
gstaa | git stash apply |
gstl | git stash list |
gstd | git stash drop |
gstp | git stash pop |
gstc | git stash clear |
gsts | git stash show –text |
scmpuff 💨
https://github.com/mroth/scmpuff
通过 gs 查看文件的 git 状态和编号,之后的 git add/checkout 等操作不需要输入文件路径,使用数字代替即可,配合上面的缩写使用更佳。
tig
控制台中的 Git 图形界面:https://github.com/jonas/tig
控制台输入
tig
回车后,命令操作:Loading...