【Git】将本地项目提交到远程

1.在Github网站或码云新建一个仓库

2.在要上传的项目命令行依次输入
echo "# meeting" >> README.md
git initgit add README.md
git commit -m "first commit"
git remote add origin https://github.com/xxxx/xxxxx.git
git push -u origin master
3.其中git remote add origin https://github.com/xxxx/xxxxx.git这句可能报错,则输入
git remote rm origin
git remote add origin https://github.com/xxxx/xxxxx.git

4.强制push

git push -f origin master

你可能感兴趣的:(git使用)