Azure DevOps-过去将master分支与master分支进行比较 [英] Azure DevOps - compare master branch to master branch in the past
问题描述
与过去的master分支相比,有没有一种简单的方法来查看master的变化?
Is there an easy way to see changes in master compared to the master branch in the past?
我希望查看过去4个月中对特定解决方案所做的所有更改.创建PR时得到的视图将是完美的,但是好像我是4个月前从母带到Master一样创建PR.
I want to see all changes to a particular solution that have happened over the past 4 months. The view I get when I create a PR would be perfect, but as if I was creating a PR from master to master-4-months-ago.
推荐答案
有几种方法:
对于单个文件
导航到存储库中的文件,选择比较"选项卡,然后应用适当的提交范围.
There are a couple ways:
For a single file
Navigate to the file in the repo, select the compare tab, and apply the appropriate commit range.
使用标签.
在4个月前的提交时创建一个标记,并为HEAD创建一个标记.
Create a tag at the commit 4 months ago and a tag for HEAD.
然后比较它们.这将为您提供它们之间的提交列表,并允许您显示差异.
Then compare them. This will give you a list of commits between them and allow you to show the diffs.
比较的方向对您的结果很重要
The DIRECTION of the comparison matters for your results
此功能使用相似的概念从应该在master之前的分支中执行git log master..
.结果将是当前分支中不在master分支中的提交,而相反的git log ..master
显示的是不在当前分支中的master分支中的提交.
This feature uses a similar concept to executing git log master..
from a branch that should be ahead of master. The result will be commits in the current branch that are not in master, whereas the reverse git log ..master
shows commits that are in master that are not in the current branch.
此功能返回在"target"
标记中而不在compare
标记中的更改.由于我们正在查看同一分支上的标签,因此将早期标签tagA
设置为compare
标签并将其与tagB
进行比较,就会显示结果.但是,将以后的提交tagB
设置为compare标签将不会得到结果b/c tagB
中没有任何内容,而tagA
中也没有.
This feature returns changes that are in the "target"
tag that are not in the compare
tag. Since we are looking at the tags on the same branch, setting the early tag tagA
as the compare
tag and comparing tagB
to it, results are shown. However, setting the later commit tagB
as the compare tag will not give results b/c there isn't anything in tagB
that isn't also in tagA
.
这篇关于Azure DevOps-过去将master分支与master分支进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!