相关疑难解决方法(0)

如何通过提交消息搜索Git存储库?

我使用提交消息"Build 0051"检查了一些源代码到GIT中.

但是,我似乎无法再找到源代码 - 如何使用命令行从GIT存储库中提取此源代码?

更新

  1. 使用SmartGIT检查版本0043,0044,0045和0046.
  2. 检出0043,并检查其他分支上的版本0051.
  3. 再次检查0043.
  4. 现在,0051已经消失了.

更新

源代码肯定存在,现在需要检查它:

C:\Source>git log -g --grep="0052"
commit 77b1f718d19e5cf46e2fab8405a9a0859c9c2889
Reflog: HEAD@{10} (unknown <Mike@.(none)>)
Reflog message: commit: 20110819 - 1724 - GL: Intermediate version. File version:  v0.5.0 build 0052.
Author: unknown <Mike@.(none)>
Date:   Fri Aug 19 17:24:51 2011 +0100

    20110819 - 1724 - GL: Intermediate version. File version: v0.5.0 build 0052.

C:\Source>
Run Code Online (Sandbox Code Playgroud)

更新

使用以下内容检索丢失的源代码:

C:\Source>git log -g --grep="0052"
commit 77b1f718d19e5cf46e2fab8405a9a0859c9c2889
Reflog: HEAD@{10} (unknown <Mike@.(none)>)
Reflog message: commit: 20110819 - 1724 - GL: …
Run Code Online (Sandbox Code Playgroud)

git git-log

761
推荐指数
10
解决办法
34万
查看次数

找到git commit来自哪个分支

有没有办法找出一个提交来自哪个分支给它的sha1?

如果您能告诉我如何使用Ruby Grit完成此任务,那么奖励积分.

git

594
推荐指数
9
解决办法
20万
查看次数

git log只显示一个提交ID

我需要一些帮助.可能只显示一个提交ID?由于git log -3显示从1到3的日志,我只想显示3.什么可能的命令将匹配它?

我用这个命令

       git log -3 --pretty=format:"%h"
Run Code Online (Sandbox Code Playgroud)

结果是

       ffbef87
       cf0e073
       1c76c5d
Run Code Online (Sandbox Code Playgroud)

我只想显示1c76c5d.

git git-log git-commit

56
推荐指数
3
解决办法
4万
查看次数

标签 统计

git ×3

git-log ×2

git-commit ×1