git首次连接远程仓库并提交的命令顺序

单纯记录一下:

git init
git remote add origin xxxxx(项目地址)
git add .
git commit -m "xxxxx"(提交信息)
git branch --set-upstream-to origin/master
git pull --allow-unrelated-histories
git push origin master

PS:在gitos china上创建远程仓库的时候最好不要选择自动创建.ignore,会出很多问题。。。

猜你喜欢

转载自blog.csdn.net/weixin_34203426/article/details/88276281