1.克隆代碼
cd d:/GitTest //指定存放的目錄 git clone https://git.oschina.net/name/test.git //你的倉庫地址
2.查看遠程所有分支
git branch -agit branch
不帶參數,列出本地已經存在的分支,並且在當前分支的前面用*
標記,加上-a
參數可以查看所有分支列表,包括本地和遠程,遠程分支一般會用紅色字體標記出來
3.新建分支並切換到指定分支
git checkout -b dev origin/release/caigou_v1.0 git checkout -b 本地分支名 origin/遠程分支名
4.可以查看代碼了