- 本地啥都没有时候,首先需要本地初始化,建库,拉取远程代码
git checkout –b 分之名(name) // 创建+切换分支
- 本地修改代码提交到远程
- 拉取远程代码并强制覆盖本地文件
git fetch --all // 需要远程的更新取回本地 git reset --hard origin/test // 撤销本地、暂存区、版本库(用远程服务器的origin/master替换本地、暂存区、版本库) git pull origin test // 拉取远程代码
git checkout –b 分之名(name) // 创建+切换分支
git fetch --all // 需要远程的更新取回本地
git reset --hard origin/test // 撤销本地、暂存区、版本库(用远程服务器的origin/master替换本地、暂存区、版本库)
git pull origin test // 拉取远程代码