1.先拉代码,避免代码冲突
git pull
2.暂存代码
//批量上传
git add .
//上传单文件
git add 111.txt
VScode直接
3.把暂存的改动提交到本地的版本库
git commit -m "注释"
不暂存直接提交到本地版本库(慎用)
git commit -a -m "注释"
4.上传
git push <远程主机名> <本地分支名>:<远程分支名>
例如:git push origin master:master
一般情况下,直接 git push 提交到当前分支。