将master分支的暂存修改应用到新分支
- 1.查看暂存记录
git stash list
- 应用暂存修改(在新分支下)
git stash pop
git stash apply # 应用暂存单不将暂存记录从列表中移除
- 检查修改是否应用(在新分支下)
git status
- 提交修改到新分支(在新分支下)
git add .
git commit -m "提交信息"
- 提交到远程(在新分支下)
git push
若出现 fatal: The current branch “新分支” has no upstream branch.
解决:git push --set-upstream origin “新分支”