• 欢迎来到本站,本站主要做程序员相关技术、博客、笔记,如果喜欢本网站那么赶紧使用Ctrl+D 收藏吧!
  • 如果有任何疑问,可以在下方文章下方留下你的评论~

[ solved ]Do you know the difference between git pull and git fetch?

赚钱副业 8个月前 (10-09) 3次浏览 0个评论

The overall architecture of GIT, as well as the main commands related to each part:

[ solved ]Do you know the difference between git pull and git fetch?

Git fetch does not change the code of the local warehouse, but pulls the remote commit data and updates the commit ID of the remote warehouse to latest.

You can check your .git folder: there are three folders in your . Git/refs : heads, remotes,tags.

They record the latest commit id of different local and remote repository respectively:

[ solved ]Do you know the difference between git pull and git fetch?

fetch changes the commit ID of the corresponding branch in remotes.

Pull = fetch + merge pull down the remote branch and merge with the local branch. fetch is just a drop-down of remote branches. You can choose how to merge them.


中国笔友, 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:[ solved ]Do you know the difference between git pull and git fetch?
喜欢 (0)
发表我的评论
取消评论
表情 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址