本地仓库绑定GitHub

2020-11-17  本文已影响0人  梨花菜

1、本地没有仓库

git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:lihuacai168/LeetCode.git
git push -u origin main

2、本地已有仓库

git remote add origin git@github.com:lihuacai168/LeetCode.git
git branch -M main
git push -u origin main
上一篇下一篇

猜你喜欢

热点阅读