Git:如何检查本地回购是否是最新的? [英] Git: How to check if a local repo is up to date?

查看:83
本文介绍了Git:如何检查本地回购是否是最新的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道我的本地回购是否是最新的(如果不是,理想情况下,我希望看到更改)。

我怎么能不做 git fetch git pull

解决方案

尝试 git fetch --dry-run
手册( git help fetch code $)表示:

$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $显示将要做的事情,变化。


I would like to know if my local repo is up to date (and if not, ideally, I would like to see the changes).

How could I check this without doing git fetch or git pull ?

解决方案

Try git fetch --dry-run The manual (git help fetch) says:

--dry-run
Show what would be done, without making any changes.

这篇关于Git:如何检查本地回购是否是最新的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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