在項目開發總,一般都會用到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 了 哈!
