git fetch
2022-06-29 本文已影响0人
口口帅日日
1.拉取远程仓库所有更新
git fetch
2.拉取远程仓库某分支更新
git fetch origin master
更新后不会影响到本地分支,需要人为判断后执行merge操作
可通过 git log FETCH_HEAD查看拉取后的日志
本地开发环境日志

远程站点日志

本地执行强制回滚test01分支
git reset --hard 0f9cd08824f24dff6ce531ba516dca5ddb4b87cd
git push -f origin test01

远程站点拉取指定分支的更新信息

远程站点根据更新信息
