Git本地已有仓库进行连接Remote库 本地没有仓库进行本地新建仓库连接Remote库

已有仓库

Administrator@Jim MINGW64 /d/phpstudy/PHPTutorial/WWW/backstagemanagement (master)
$ git remote add origin https://github.com/7117/backstagemanagement.git

Administrator@Jim MINGW64 /d/phpstudy/PHPTutorial/WWW/backstagemanagement (master)
$ git push -u origin master
Enumerating objects: 25, done.
Counting objects: 100% (25/25), done.
Delta compression using up to 8 threads
Compressing objects: 100% (21/21), done.
Writing objects: 100% (25/25), 89.59 KiB | 4.48 MiB/s, done.
Total 25 (delta 0), reused 0 (delta 0)
To https://github.com/7117/backstagemanagement.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

 没有仓库

git init
touch README.md
git add README.md(第一次为空的add的话  会报错error: src refspec master does not match any)
git commit -m "first commit"
git remote add origin https://github.com/7117/eShopBackstage.git
git push -u origin master

 说明

Git本地已有仓库进行连接Remote库 本地没有仓库进行本地新建仓库连接Remote库_第1张图片

你可能感兴趣的:(Git)