在git上创建仓库后,怎么往上面推代送代码

本地如果没有一个仓库:

echo “# toutiao” >> README.md
git init
git add README.md
git commit -m “first commit”
git branch -M main
git remote add origin [email protected]:imkf-zhang/toutiao.git
git push -u origin main

本地有了一个仓库

git remote add origin [email protected]:imkf-zhang/toutiao.git
git branch -M main
git push -u origin main

猜你喜欢

转载自blog.csdn.net/weixin_43131046/article/details/123167413
今日推荐