【问题标题】:How can I view and pull previous remote branch push?如何查看和拉取以前的远程分支推送?
【发布时间】:2014-01-31 12:40:25
【问题描述】:

假设我有一个名为branch1 的分支。我做了一些合并和推送(在不同的日期),以便将我的更改保存在远程仓库中,例如:

12 月 16 日:

git merge -am "branch1 comment1"  
git push origin branch1  

12 月 17 日:

git merge -am "branch1 comment2"  
git push origin branch1  

12 月 18 日:

git merge -am "branch1 comment3"  
git push origin branch1  
  1. 如何在REMOTE上列出/查看分支1的历史(以上3个版本、日期和cmets的列表)?

    我试过git show -r branch1git ls-remote origin branch1git log origin/branch1都失败了...

  2. 如何拉取分支 1 的 12 月 17 日版本?

我还查看了Retrieve specific commit from a remote Git repository 和相关的,但我找不到简单的简短答案。

【问题讨论】:

  • 另外,当我试图弄清楚这一点时,我使用“git branch -D branch1”在本地删除了 branch1 ...但它存在于远程仓库中

标签: git logging version push


【解决方案1】:

可以列出本地跟踪分支

git log origin/branch1

【讨论】:

    猜你喜欢
    • 2020-05-25
    • 1970-01-01
    • 2015-08-16
    • 1970-01-01
    • 2011-08-19
    • 2018-08-17
    • 1970-01-01
    • 2018-03-04
    • 2015-12-15
    相关资源
    最近更新 更多