查看本地分支: git branch
查看远程分支: git branch -r
查看本地和远程所有分支: git branch -a
创建本地分支:git branch dev
将本地修改推送到远程分支:git push origin dev
拉取远程分支并创建本地分支:git checkout -b 本地分支名x origin/远程分支名x
方式一: //存到暂存区
git add.
git stash
方式二: //commit存到提交历史
git add .
git commit -m "commit message"
网友评论