Git学习

1.git clone

git仓库可以使用git clone获得:
git clone git://url
例子:

shanl@edev-HP-Z210-Workstation:~/AndroidCode$ git clone ../GitDb/Broadcom21664.git/
Cloning into 'Broadcom21664'...
done.

2.git branch

branch:
git branch -a           查看所有分支。
git branch new_branch   创建新的分支。
git branch -d branch    删除分支。
git checkout branch     切换当前分支。-f参数可以覆盖未提交内容。
例子:
查看所有分支
shanl@edev-HP-Z210-Workstation:~/AndroidCode/Broadcom21664$ git branch -a
* master
  remotes/origin/Android_origin_jb_4.2.2_r1
  remotes/origin/HEAD -> origin/master
  remotes/origin/HawaiiGarnet_5.2.3_c_a18
  remotes/origin/HawaiiGarnet_5.2.4.3
  remotes/origin/HawaiiGarnet_5.2.4.3_c_edn010_NotTested
  remotes/origin/HawaiiGarnet_5.2.7.1_02_c_a18
  remotes/origin/HawaiiGarnet_5.2.7.1_05_c_a18
  remotes/origin/HawaiiGarnet_5.2.7.1_c_a18
  remotes/origin/HawaiiGarnet_c_a18_5.2.6
  remotes/origin/Hawaii_3.2.1.2
  remotes/origin/master
切换分支:


你可能感兴趣的:(git)