Git-往返github和本地
将GitHub仓库Test弄到本地
- 本地新建文件夹Test
- 右击运行gitbash
- 在gitbash中输入git init
- 在github 仓库选择clone or download
- 复制连接https://github.com/xxx/xxx.git
- 在gitbash中输入git clone https://github.com/xxx/xxx.git
将本地文件夹上传到GitHub
- github中新建仓库NewRepo
- 在本地文件夹Test中右击选择gitbash,输入git init
- git status(无关紧要)
- git add *
git status(无关紧要)
- git commit -m 'description of this commit'
- git status(无关紧要)
- 从github仓库NewRepo点击clone or download,复制连接
- git remote add origin https://github.com/xxx/xxx.git
- git push -u origin master
欢迎关注本站公众号,获取更多信息