便捷的oh-my-zsh

  • 安装
    • sudo apt-get install zsh
      通过curl:
      curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
      通过wget:
      wget --no-check-certificate https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh
      配置:
      命令行下面輸入 vim ~/.zshrc
  • 配置
    • 命令行下面輸入: vim ~/.zshrc
    •  修改主题:export ZSH_THEME="bira"
    • 添加自定义快捷键:
      • alias cdd="cd home/develop"
      • alias gcob="git checkout -b"
    • 添加rbenv支持:
      • [[ -s $HOME/.rbenv/scripts/rbenv ]] && source $HOME/.rbenv/scripts/rbenv
        export PATH="$HOME/.rbenv/bin:$PATH"
        eval "$(rbenv init -)"
    • 添加插件支持:
      • plugins=(git rails ruby lighthouse gem github bundle rbenv)
  • oh-my-zsh默认的git快捷键
    • g – git
      gst – git status
      gl – git pull
      gup – git pull --rebase
      gp – git push
      gd – git diff
      gdc – git diff --cached
      gdv – git diff -w "$@" | view -
      gc – git commit -v
      gc! – git commit -v --amend
      gca – git commit -v -a
      gca! – git commit -v -a --amend
      gcmsg – git commit -m
      gco – git checkout
      gcm – git checkout master
      gr – git remote
      grv – git remote -v
      grmv – git remote rename
      grrm – git remote remove
      gsetr – git remote set-url
      grup – git remote update
      grbi – git rebase -i
      grbc – git rebase --continue
      grba – git rebase --abort
      gb – git branch
      gba – git branch -a
      gcount – git shortlog -sn
      gcl – git config --list
      gcp – git cherry-pick
      glg – git log --stat --max-count=10
      glgg – git log --graph --max-count=10
      glgga – git log --graph --decorate --all
      glo – git log --oneline --decorate --color
      glog – git log --oneline --decorate --color --graph
      gss – git status -s
      ga – git add
      gm – git merge
      grh – git reset HEAD
      grhh – git reset HEAD --hard
      gclean – git reset --hard && git clean -dfx
      gwc – git whatchanged -p --abbrev-commit --pretty=medium
      gsts – git stash show --text
      gsta – git stash
      gstp – git stash pop
      gstd – git stash drop
      ggpull – git pull origin $(current_branch)
      ggpur – git pull --rebase origin $(current_branch)
      ggpush – git push origin $(current_branch)
      ggpnp – git pull origin $(current_branch) && git push origin $(current_branch)
      glp – _git_log_prettily
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值