git 使用命令总结

     当远程仓库有README.md的时候我们创建的工程里没有这个文件这时候你提交的仓库和远程的不一致就会导致提交被拒绝

此时我们可以先拉取主干到本地的temp分支  然后和本地的master分支合并

通过代码:

git fetch origin master:temp
git merge temp
就可以了
 
git init 初始化文件夹初始化仓库
git remote add origin https://git.oschina.net/bimingcong/qwe.git 这是给本地仓库添加远程仓库的提交地址
git push -u origin master 这个是将本地仓库 提交到远程仓库
git commit -m "first commit"这个是提交时填写的提交信息
git diff temp 可以看见本地的分支和temp分支的不一样的地方
原文地址:https://www.cnblogs.com/bimingcong/p/5717472.html