在项目开发总,通常都会用到git管理工具,有的公司可能仍是用的svn;无论怎么样。用的顺手就行;javascript
来讲下git 的基本使用java
git clone + 项目地址连接; 能够把项目克隆到本地;git
而后通常顺序是svn
$ cd gap-official-site // 这里是进入到项目的文件夹中
// 查看分支 这里是看的本地的分支 $ git branch * master
接着是查看远程分支工具
$ git branch -a // 查看远程分支 * master remotes/origin/HEAD -> origin/master remotes/origin/cherry-pick-2bf56ac3 remotes/origin/cherry-pick-42525e75 remotes/origin/cherry-pick-939d6f79 remotes/origin/cherry-pick-966bced7 remotes/origin/cherry-pick-eda5f5ca remotes/origin/cherry-pick-f6dcc5e6 remotes/origin/cherry-pick-f7232894 remotes/origin/feature-0.0.1 remotes/origin/feature-0.0.10 remotes/origin/feature-0.0.2 remotes/origin/feature-0.0.3 remotes/origin/feature-0.0.4 remotes/origin/feature-0.0.5 remotes/origin/feature-0.0.6 remotes/origin/feature-0.0.7 remotes/origin/feature-0.0.8 remotes/origin/master
而后切换到当前正在开发的分支下spa
1 $ git checkout -b feature-0.0.10 origin/feature-0.0.10 2 Switched to a new branch 'feature-0.0.10' 3 Branch 'feature-0.0.10' set up to track remote branch 'feature-0.0.10' from 'origin'.
显示上面的内容就表示已经切换成功了!code
不放心再用命令查看下你当前所在的分支blog
$ git branch * feature-0.0.10 master
如今能够开始 修 bug 了 哈! ip