关于GitHub上传的注意事项

  1. 在IDEA里将项目设置成git仓库
  2. 在GitHub上新建resposity,注意不要加readme,会在后面的push环节出错
  3. 在本地仓库的命令行下输入
  • git remote add origin [email protected]:kristengao/best-fit-decreasing.git
  • fatal: 远程 origin 已经存在。
  • git remote rm origin

git remote add origin [email protected]:kristengao/best-fit-decreasing.git
git branch -M main
git push -u origin main

同时要建立SSH密钥,并且在GitHub端配置

猜你喜欢

转载自blog.csdn.net/qq_37581730/article/details/114380760
今日推荐