第一步: 在Github上创建自己的repository

第二步:建立本地仓库cd到你的本地项目根目录下,执行git命令

1:$ cd 到你的项目目录下

2:$ git init

第三步:将本地项目工作区的所有文件添加到暂存区

3:$ git add . 

第三步:将暂存区的文件提交到本地仓库

4:$ git commit -m "注释"

第五步:将本地仓库关联到Github上

5:$ git remote add origin https://github.com/zhibinhsu/ShowAllLabel.git  用自己的url(创建的仓库的地址,赋值地址栏里面的地址即可)

这步骤如果提示错误:fatal: remote origin already exists. 解决办法如下:

  1、先删除远程 Git 仓库 $ git remote rm origin 

  2、再重新添加远程 Git 仓库 $ git remote add origin https://github.com/zhibinhsu/ShowAllLabel.git  用自己的url(创建的仓库的地址,赋值地址栏里面的地址即可)

 

同步到服务器

6:$ git push -f origin master

相关文章:

  • 2021-07-26
  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2021-06-18
  • 2021-09-09
  • 2021-10-30
  • 2021-10-15
猜你喜欢
  • 2022-12-23
  • 2021-05-06
  • 2021-11-25
  • 2021-08-08
  • 2022-12-23
  • 2021-08-21
  • 2021-04-30
相关资源
相似解决方案