gpt4 book ai didi

git - 搜索 git reflog

转载 作者:太空狗 更新时间:2023-10-29 14:30:57 26 4
gpt4 key购买 nike

当出现新问题时,我会创建一个新分支。这些分支以 issu 开头命名。与 master merge 后,这些分支被删除。我想获得所有此类分支机构的列表。我能够使用 git reflog

获取它
>git reflog
55e8b45 (HEAD -> master, origin/master, origin/HEAD) HEAD@{0}: merge issu4-HasScript-and-HasFormat-checkbox-toggle: Fast-forward
7caf2c6 HEAD@{1}: checkout: moving from issu4-HasScript-and-HasFormat-checkbox-toggle to master
55e8b45 (HEAD -> master, origin/master, origin/HEAD) HEAD@{2}: commit (amend): Column validation including Has-Script and Has-Format
490a29a HEAD@{3}: commit: Column validatio inclnsuding Has Script and Has Format
7caf2c6 HEAD@{4}: checkout: moving from master to issu4-HasScript-and-HasFormat-checkbox-toggle
7caf2c6 HEAD@{5}: merge issu3-make-SFTPFingerprint-required: Fast-forward
fbad7cd HEAD@{6}: checkout: moving from issu3-make-SFTPFingerprint-required to master
...

有什么方法可以过滤这些条目以获得所有以 issu 开头的 merge 。

我正在尝试获取所有已 merge 到 master 中并以 issu 开始的已删除分支。获得这些的其他解决方案也很好。

我搜索了很多,找不到解决方案。

更新:

我正在使用 Windows。我目前的解决方案是

git reflog | findstr /c:"merge issu"

git本身有什么解决办法吗?

最佳答案

你可以使用这个命令,

git reflog --grep-reflog=<pattern>

在您的情况下,它是 git reflog --grep-reflog="merge issu"

Link

关于git - 搜索 git reflog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56571484/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com