06_git添加远程仓库并向远程仓库中推送代码

git添加远程仓库

git remote add origin 仓库地址

git remote add origin git@gitee.com:longdcheng/cheng_pro.git

将代码推送到远程仓库

git push origin master

# 注意,如果出现,推送失败可能就需要运行强推(因为此时代码可能不是基于仓库中代码进行的修改)
git push -f origin master

原文地址:https://www.cnblogs.com/nichengshishaonian/p/11550657.html