在项目开发总,一般都会用到git管理工具,有的公司可能还是用的svn;不管怎么样。用的顺手就行;
来说下git 的基本使用
git clone + 项目地址链接; 可以把项目克隆到本地;
然后一般顺序是
$ 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
然后切换到当前正在开发的分支下
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'.
显示上面的内容就表示已经切换成功了!
不放心再用命令查看下你当前所在的分支
$ git branch * feature-0.0.10 master
现在可以开始 修 bug 了 哈!