Git 命令行使用

1、切换分支

<1> 查看远程分支

$ git branch -a  

* (HEAD detached at origin/android_fundrive_v5)

  master

  remotes/origin/NaviCore5.6.x

  remotes/origin/add_mmap_for_andriod_v4_liudf

  remotes/origin/android_fundrive_presentation

  remotes/origin/android_fundrive_split_msg_loop

  remotes/origin/android_fundrive_v3_0413

  remotes/origin/android_fundrive_v4

  remotes/origin/android_fundrive_v5

<2> 查看本地分支

$ git branch

* (HEAD detached at origin/android_fundrive_v5)

  master

<3> 修改分支

$ git checkout -b android_fundrive_v5 origin/android_fundrive_v5

Switched to a new branch 'android_fundrive_v5'

Branch android_fundrive_v5 set up to track remote branch android_fundrive_v5 from origin.

<4> 确认操作是否成功 —— 查看本地分支

$ git branch

* android_fundrive_v5   ——> * 标识当前分支

  master


2、克隆文件

$ git clone http://61.122.117.50:8090/T110_mapbarSDK_UI2.0Demo/lgdrive.git 

克隆文件的位置就在当前的目录

你可能感兴趣的:(Git 命令行使用)