1、注册登录GitHub账号
2、点击右上角头像,点击 Your profile
3、如下图所示本地文件上传到GitHub
4、输入 repository name,选择public ,点击create repository按钮
5、创建成功:本地文件上传到GitHub
6、Github上传项目的方法,有两种方法:一种通过https,一种通过ssh。本人默认选择https,当然ssh可以自行尝试
7、打开终端,在终端进入要传文件的根目录 。下面继续在终端执行操作
8、输入 git init
9、输入git add . (注意最后面的点)
10、输入 git commit -m “信息说明” (git commit -m “信息说明”
11、git remote add origin https的地址
12、git push -u origin master
13、刷新GitHub界面即可看到上传的信息


git 添加远程github仓库的时候提示错误:fatal: remote origin already exists.
解决办法:输入 git remote rm origin 在执行上面的11步骤


注意cd 进入的文件是要上传内容的直接上一级目录

相关文章:

  • 2022-01-07
  • 2021-12-26
  • 2021-11-29
  • 2021-05-28
  • 2021-05-25
  • 2021-06-10
  • 2021-06-23
  • 2021-05-16
猜你喜欢
  • 2021-08-26
  • 2021-11-05
  • 2021-08-14
  • 2022-02-09
  • 2022-01-07
相关资源
相似解决方案