Skip to content

查看操作记录

git reflog

查找分支创建记录: 搜索类似 checkout: moving from <父分支> to <当前分支> 的条目,记录中的 <父分支> 即为来源分支。 示例:

sh
a1b2c3d HEAD@{5}: checkout: moving from main to feature/login

表示 feature/login 是从 main 分支创建的。

过滤记录(可选): git reflog | grep 'checkout: moving from'

Released under the MIT License.