oh my zsh + item2 使开发更流畅 (含git简化命令)

1、git简化命令

alias ga='git add'
alias gb='git branch'
alias gba='git branch -a'
alias gbd='git branch -d'
alias gcam='git commit -a -m'
alias gcb='git checkout -b'
alias gco='git checkout'
alias gcp='git cherry-pick'
alias gd='git diff'
alias gfo='git fetch origin'
alias ggpush='git push origin $(git_current_branch)'
alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
alias glgp='git log --stat -p'
alias gm='git merge'
alias gp='git push'
alias gst='git status'
alias gsta='git stash save'
alias gstp='git stash pop'

2、git下载地址  及  oh my zsh  安装

git下载: https://git-scm.com

部分公司项目不支持https克隆项目(不允许对外,需要使用ssh方式,配置ssh)

1.本地安装好git;

2.桌面右键 Git Bash Here 打开git命令行;

3.ssh-keygen -t rsa -C "nideyouxiang@xxx.com"   (全部按enter);

4.cd ~/.ssh   (如果没有执行第三步,则不会有这个文件夹);

5.cat id_rsa.pub     在命令行打开这个文件,会直接输出密钥;

6.复制,打开github   ,点自己头像 >> settings >> SSH and GPG keys >>New SSH key 

7. titile  随便写。  key里    粘贴第六步的内容;完成。

 

item2下载:https://www.iterm2.com/

 

Mac系统默认使用dash作为终端,可以使用命令修改默认使用zsh: 

chsh -s /bin/zsh

安装oh my zsh


# curl 安装方式

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

 

 

 

3、设置快速启动APP

参考另一篇博文。

https://blog.csdn.net/Dong8508/article/details/88843148

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值