用git将自己的项目传到github上
参考
https://blog.csdn.net/Jackson23333/article/details/81315474
https://blog.csdn.net/m0_37725003/article/details/80904824
主要步骤
- 先到本地项目 右键 git bash here
- git init 初始化
- git clone + 你的github仓库地址
- git add . ( 注意有空格和点)
- git commit -m “双引号里写此次提交的备注”
- git remote add origin + 你的github仓库地址
- git push -u origin + 你的分支名 (一般为main或master)
遇到的问题:
Branch ‘main’ set up to track remote branch ‘main’ from ‘origin’.
解决方法:
这段代码是将本地连接到github仓库
连接成功后就可以将本地代码push到github上了: