美文网首页
git篇之fetch

git篇之fetch

作者: 清宵寒夜 | 来源:发表于2021-07-27 09:34 被阅读0次

git fetch + git merge = git pull
1、取回远程代码
git fetch --->创建并更新本地远程分支,即在本地创建分支同时拉取远程代码到本地分支上

git fetch origin --->将远程仓库origin的全部更新取回本地

git fetch origin branch --->将远程仓库指定的分支更新取回本地

get fetch origin branch:locbranch --->将远程origin的branch分支代码拉取到本地的locbranch分支

2、查看远程代码更新内容
git log -p FETCH_HEAD --->查看取回的远程代码更新信息

3、git merge合并代码

相关文章

网友评论

      本文标题:git篇之fetch

      本文链接:https://www.haomeiwen.com/subject/qxbzultx.html