简体   繁体   English

当我在 Android Studio 4.1 中使用 Git 时,如何显示所选文件的所有分支中的所有历史文件

[英]How can I display all history files in all branches for selected file when I use Git in Android Studio 4.1

I use Git in Android Studio 4.1, I have several branches for my project, such as master brach, TestC branch, you can see master brach Image , TestC branch Image .我在 Android Studio 4.1 中使用 Git,我的项目有几个分支,例如master brach、 TestC分支,您可以看到master brach ImageTestC 分支 Image

Now I switch to master branch, I hope to see all history files in all branches for the file PlayInterface.kt .现在我切换到master分支,我希望看到文件PlayInterface.kt 的所有分支中的所有历史文件。

After I click VCS -> Git -> Show History in Android Studio menu, I find only history files in current master branch for the file PlayInterface.kt are listed, you can see PlayInterface Image .在 Android Studio 菜单中单击VCS -> Git -> Show History后,我发现仅列出了当前 master 分支中PlayInterface.kt文件的历史文件,您可以看到PlayInterface Image

I have committed the PlayInterface.k t in both master branches and TestC branch, how can I display all history files in all branches for PlayInterface.kt when I locate master branch ?我已经在master分支和TestC分支中提交了PlayInterface.k t,当我找到master分支时,如何在PlayInterface.kt 的所有分支中显示所有历史文件?

master brach Image主分支图像

在此处输入图片说明

TestC branch Image TestC 分支图片

在此处输入图片说明

PlayInterface Image播放界面图片

在此处输入图片说明

In Android Studio and IDEA it is the same: open Git | Log在 Android Studio 和 IDEA 中是一样的:打开Git | Log Git | Log toolwindow and select Path filter to include files of your interest, and Branch filter to include branches of interest (eg All ) Git | Log工具窗口并选择Path过滤器以包含您感兴趣的文件,并选择Branch过滤器以包含感兴趣的分支(例如All

在此处输入图片说明

Another option would be to use Show All Branches from "Show File history" toolwindow:另一种选择是使用“显示文件历史记录”工具窗口中的Show All Branches 在此处输入图片说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM