暂存所有当前更改
git stash
然后切换分支
git checkout -b 本地分支 origin/远程分支
如果需要恢复之前的更改
git stash pop
**
如果首次提交,则先初始化,命令如下
**
在当前分支创建初始提交
git add .
git commit -m "Initial commit"
然后切换分支
git checkout -b xxx origin/yyy
git stash
git checkout -b 本地分支 origin/远程分支
git stash pop
**
**
git add .
git commit -m "Initial commit"
git checkout -b xxx origin/yyy