LoginSignup
0
1

More than 1 year has passed since last update.

Oh-My-Zsh入れるとGitのエイリアスを設定しなくても使えるって、知ってる?

Posted at

最近知ったんですが、Oh-My-ZshをインストールするとOh-My-ZshがGitのエイリアスを設定してくれるみたいです。

g:       $git   
gst:     $git status
gl:      $git pull  
gup:     $git fetch && git rebase
gp:      $git push  
gc:      $git commit -v
gca:     $git commit -v -a  
gco:     $git checkout
gcm:     $git checkout master   
gb:      $git branch
gba:     $git branch -a 
gcount:  $git shortlog -sn
gcp:     $git cherry-pick   
glg:     $git log --stat --max-count=5
glgg:    $git log --graph --max-count=5 
gss:     $git status -s
ga:      $git add   
gm:      $git merge
grh:     $git reset HEAD    
grhh:    $git reset HEAD --hard
gsr:     $git svn rebase    
gsd:     $git svn dcommit
ggpull:  $git pull origin $(current_branch)
ggpush:  $git push origin $(current_branch)
gdv:     $git diff -w "$@" | view -
ggpnp:   $git pull origin $(current_branch) && git push origin $(current_branch)
git-svn-dcommit-push: $git svn dcommit && git push github master:svntrunkgpa: $git add .; git commit -m "$1"; git push;

おまけ

よく使うOh-My-Zshのエイリアス

# dir名だけで移動可能 cd 不要です
$ Desktop

# コレと同じ
$ cd Desktop
# dir名をtakeの後に指定するとディレクトリを作って、そのディレクトリに移動してくれます
$ take me

# コレと同じ
$ mkdir me && cd me
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1