'git fetch'放置在哪里? [英] Where does 'git fetch' place itself?

查看:635
本文介绍了'git fetch'放置在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我正在使用本地存储库中的license.txt,并对其进行了修改.在我提交之前,Susan对其进行修改并将其提交到远程存储库.

Let's say I'm working on license.txt in my local repository, and I modify it. Before I commit, Susan modifies and commits it to the remote repository.

如果我执行git fetch,我的更新究竟发生了什么?结果去哪里了?

If I do git fetch, what exactly happens to my updates? Where do the results go?

推荐答案

更新没有任何反应. git fetch,因为缺少更好的词,所以从远程存储库中获取提交,并将其放置在对象数据库的本地副本中.由于您是在自己的分支上工作,因此它们之间没有任何交互,除非您明确选择进行某种交互,例如通过重新定级,选择樱桃等.

Nothing happens to your updates. git fetch, for lack of a better word, fetches commits from a remote repository and places them in the local copy of the object database. Since you are working on your own branch, there's no interaction between them, until you explicitly choose to have some interaction, e.g., by rebasing, cherry-picking, etc.

您可以通过检出它们各自的分支(例如,origin/master)来访问提取的提交.

You can access the fetched commits by checking out their respective branches (e.g., origin/master).

这篇关于'git fetch'放置在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆