1. 在工作空間,右鍵,打開Git Bash
2. clone主分支的代碼(即下載主分支代碼的過程)
執行命令: git clone xxx.git
3. 進入工程目錄
cd xxx
4.I believe this occurs when you are trying to checkout a remote branch that your local git repo is not aware of yet. Try:
git remote show origin
5.If the remote branch you want to checkout is under “New remote branches” and not “Tracked remote branches” then you need to fetch them first:
git remote update
git fetch
6 切換到分支並下載代碼
git checkout -b 遠程倉庫分支名字 origin/遠程倉庫分支名字
git pull