上传本地项目到GitHub

来源:互联网 发布:淘宝企业店铺公司更改 编辑:程序博客网 时间:2024/06/07 09:50

1、git init

2、git add .

3、git commit -m "注释"

4、在https://github.com/sdzczh后面加上项目链接

5、

  1、先输入$ git pull origin master //先把远程服务器github上面的文件拉下来

    2、再输入$ git push origin master

    3、如果出现报错 fatal: Couldn't find remote ref master或者fatal: 'origin' does not appear to be a git repository以及fatal: Could not read from remote repository.

    4、则需要重新输入$ git remote add origin

6、git push -u origin master

原创粉丝点击