[英]How to view list of changes to fetch from upstream/origin, or changes to push to upstream/origin
I'm trying to get a feel for how to do certain things in TortoiseGit that are pretty intuitive in TortoiseHG. 我试图了解如何在TortoiseGit中执行某些在TortoiseHG中非常直观的事情。
TortoiseHG has the Workbench which basically is my central tool to sync the local repository with remote ones: upstreams and origin. TortoiseHG的工作台基本上是我用来将本地资源库与远程资源库(上游资源和原始资源)同步的中央工具。
It is easy to see what changes I'm missing locally (so I need to fetch them) or remotely (so I need to push them). 很容易看到我在本地(因此我需要获取它们)或在远程(所以我需要推动它们)缺少哪些更改。
What is similar functionality in TortoiseGit? TortoiseGit中的类似功能是什么?
Maybe TortoiseGit does not have those; 也许TortoiseGit没有这些; if not: please suggest tools that do.
如果不是:请提出建议的工具。
My answer doesn't directly apply to TortoiseGit, but im sure you will find the equivalent features easily. 我的答案并不直接适用于TortoiseGit,但我敢肯定您会轻松找到等效的功能。
Git is a distributed version control system. Git是一个分布式版本控制系统。 In order to see the remotes changes, you need to fetch them first:
为了查看遥控器的更改,您需要先获取它们:
git fetch
Then you can use git diff
to view the differences between your current branch, or even your current (dirty) working directory. 然后,您可以使用
git diff
查看当前分支甚至当前(脏)工作目录之间的差异。
Alternatively you may use git merge --dry-run
to see what has to be merged. 或者,您可以使用
git merge --dry-run
查看必须合并的内容。
To see the things you have changed but not commited (uncommited changes) just type git status
. 要查看您已更改但未提交(未提交的更改)的内容,只需键入
git status
。
SourceTree can do this: without the need to fetching, it shows I'm 1 change behind on the upstream remote. SourceTree可以做到这一点:无需获取,它表明我在上游远程服务器上落后了1个更改。
After pulling it, it shows the origin remote is 2 changes behind on master. 拉动它后,它显示原点远程主机在主站上落后2个更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.