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
网友评论