如何刷新我的 git 存储库?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17322990/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 08:41:01  来源:igfitidea点击:

How can I refresh my git repository?

git

提问by user1489886

I have a git repo offline copy, and after some time somebody else might have made changes to it. How can I bring my repository up to speed with the new changes? How can I check that my repo is at its latest update?

我有一个 git repo 离线副本,一段时间后其他人可能对其进行了更改。我怎样才能让我的存储库跟上新的变化?如何检查我的存储库是否处于最新更新?

回答by demure

git pullwill pull the latest changes.

git pull将拉取最新的变化。

git fetchwill update the list of changes.
git statuswill check the status of the repo. Without the fetch first, you will not see remote changes.

git fetch将更新更改列表。
git status将检查回购的状态。如果不先获取,您将看不到远程更改。

Also, pleaseread the documentation.

另外,阅读文档