简体   繁体   English

列出已删除分支上的所有提交历史记录

[英]Listing all commit history on a deleted branch

I have deleted a remote branch on my project a few months ago but now I need to access it :( 几个月前,我已经在项目中删除了一个远程分支,但是现在我需要访问它:(

The branch has been removed from both my local computer and from the remote git server. 该分支已从我的本地计算机和远程git服务器上删除。

How can I view the list of all commits on a deleted branch and then checkout (or merge) one of those commits to my local computer? 如何查看已删除分支上所有提交的列表,然后将其中一个提交检出(或合并)到本地计算机?

thanks for your help. 谢谢你的帮助。

If the branch has been merged back into the original branch, then you can still view all of the commits (but not necessarily as a separate branch). 如果分支已经合并回原始分支,那么您仍然可以查看所有提交(但不一定是单独的分支)。 Assuming the deleted branch has not been garbage collected, you could try to use git reflog to view the original checkout of the branch and then clone it: http://deekayen.net/recover-deleted-git-branch 假设尚未删除已删除的分支,则可以尝试使用git reflog查看分支的原始签出,然后将其克隆: http : //deekayen.net/recover-deleted-git-branch

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

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