简体   繁体   English

如何查看更改列表以从上游/源获取,或更改推到上游/源

[英]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中的类似功能是什么?

  • How can I see a list of changes from a remote origin or upstream that I want to fetch locally? 如何查看要从本地获取的来自远程源或上游的更改列表?
  • How can I see a list of changes locally that want to push to the origin or upstream? 如何在本地看到要推送到原始位置或上游的更改列表?

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个更改。

我在上游遥​​控器上落后了1原点遥控器在主机上落后2个更改

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GitHub Actions 将更改推送到 Windows 上的远程/源 - GitHub Actions push changes to remote/origin on windows 如何从上游分支合并? - How to merge from upstream branch? Git 如何从 UNC 路径获取更改? - How does Git fetch changes from an UNC path? 在Windows上进行Dockererized Kong操作,显示“从上游服务器收到无效响应” - Dockererized Kong on windows giving “An invalid response was received from the upstream server” 如何将上游构建的二进制文件传递给远程下游构建从属服务器 - How to pass binaries built upstream to a remote downstream build slave 使用 Windows 代理将更改从 teamcity 推送到 git 的步骤是什么 - what are the steps to push changes to git from teamcity using windows agent 将git远程名称重命名为“上游” - Rename git remote name to “upstream” 将 git 上游设置到 windows 服务器 - Setting git upstream to a windows server 如何保持ReadDirectoryChangesW不会丢失文件更改 - How to keep ReadDirectoryChangesW from missing file changes 我如何告诉python从列表中的电子邮件中获取最后2个单词,但是不是python定义的列表,因为它发生了变化? - How can I tell python to take the last 2 words from an email that is in a list like structure but is not a list defined by python because it changes?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM