拉取
- 创建文件夹
- cd 到需要拉取的文件夹
- 关联远程仓库:git remote add origin 仓库地址
- 拉取文件命令:git clone 仓库地址
上传
- 文件上传本地仓库:git add . (add后面有个点)
- 文件提交:git commit -m “注释”
- 文件上传远程仓库:git push origin master
命令
- git config --global user.email “邮箱地址”
- git config --global user.name “用户名”
- 初始化仓库: git init
- 关联远程仓库:git remote add origin
- 代码拉取:git pull(本地文件有修改先上传在拉取)
- 创建分支并切换到分支:git checkout -b 分支