Просмотр исходного кода

add shortcut to setup git tracking for the current branch

Assuming the default remote name of origin. Also, we don't always push with `-u`
hence, this is useful. Tracking for us is really to get rid of the wrongly
displayed commits-ahead/behind messages (since the remote HEAD marker doesn't
move).
Weiyi Lou 13 лет назад
Родитель
Сommit
7377697d70
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      zsh/oh-my-zsh-custom/git.zsh

+ 1 - 0
zsh/oh-my-zsh-custom/git.zsh

@@ -7,6 +7,7 @@ alias gl='git log --graph --date=relative --pretty="format:%C(yellow)%h %Cblue[%
 alias gls='git log --graph --stat'
 alias glp='git log -p'
 alias gr='git rebase'
+alias gtrack='git branch --set-upstream $(current_branch) origin/$(current_branch)'
 # useful git plugin built-in ones include:
 #   ga, gc, gco, gb, gba, gm, grhh, ggpull, ggpush
 # ggpull translates into `git pull origin <current branch>`, same for ggpush