硬复位到之前的git提交 - 不工作

时间:2015-10-10 19:24:54

标签: git git-commit git-remote git-reset git-revert

我跑了

git log

找到这个 -

    C:\WAMP\www\gtwhero [panelist_qa_AJAX_solution]> git log
    commit afbda8a710aab851937532543bb0a99f246874e3
    Merge: 19323e3 cfde9ef
    Author: S. M. Abrar Jahin <abrarjahin@live.com>
    Date:   Sun Oct 11 00:51:40 2015 +0600

        Merge branch 'panelist_qa_AJAX_solution' of https://github.com/techmarket/gtwhero into panelist_qa_AJAX_solution

    commit 19323e3d1c8055c324a7ed65c3868e92420aad9f
    Author: S. M. Abrar Jahin <abrarjahin@live.com>
    Date:   Sun Oct 11 00:48:43 2015 +0600

        nothing

    commit cfde9eff38fccd15dfc521e7ba075622a31a5a6e
    Merge: 38a68bd b773dd2
    Author: Platon <heonozis@mail.ru>
    Date:   Sat Oct 10 17:08:30 2015 +0300

        Merge remote-tracking branch 'remotes/origin/master' into panelist_qa_AJAX_solution

        Conflicts:
            app/Http/Controllers/WebinarController.php

    commit b773dd225b8ffa34cb9231a4e58063756d7e53f1
    Merge: 1d9923d 21f19e3
    Author: Platon Mysnyk <Heonozis@mail.ru>
    Date:   Sat Oct 10 16:04:29 2015 +0300

        Merge pull request #98 from techmarket/fix-webinar-hosts-all-questions-issue

        Fix webinar hosts all questions issue

    commit 21f19e3585329d3d2006e32254ff62808b241f90
    Author: Ronak <coolronak.shah@rediffmail.com>
    Date:   Sat Oct 10 16:27:21 2015 +0530

        Reverse the QA order in Webinar host Layout

    commit ea539597995011952b2ca083ae61b4ca1c4176aa
    Author: Ronak <coolronak.shah@rediffmail.com>
    Date:   Sat Oct 10 16:12:28 2015 +0530

        Fix Webinar Host Layout QA section update and Also changed the Alert message for Vote chart refreshed in host layo
    commit 38a68bda7d0e7c13d92bf42f791f9c3e805d909d
    Author: S. M. Abrar Jahin <abrarjahin@live.com>
    Date:   Sat Oct 10 16:23:39 2015 +0600

        "panelist_id" and auth fix with help of @Ronak

    commit 3ba2bfea5d7ad8ff4a83b23595c7a9841bc064b2
    Author: S. M. Abrar Jahin <abrarjahin@live.com>
    Date:   Sat Oct 10 13:31:08 2015 +0600

        Animation for removing item

    commit 2181c108c76f187c09744ae6df131f8f80f0b16d
    Author: S. M. Abrar Jahin <abrarjahin@live.com>
    Date:   Sat Oct 10 12:27:53 2015 +0600

        Animation Added in QA

    commit 180337bfe91686d137e3222c196e626f712832b1
    Author: S. M. Abrar Jahin <abrarjahin@live.com>
    Date:   Sat Oct 10 12:17:34 2015 +0600

        All AJAX of this page "http://localhost/gtwhero/public/webinar/LB42JgKdjEAOAe5b37MV/panelist" done

    commit e25c6c19605627a00ca033139c2d98af0feacacf
    Author: S. M. Abrar Jahin <abrarjahin@live.com>
    Date:   Sat Oct 10 07:45:42 2015 +0600

        Before breakfast - done, remaining AJAX query

代码已经在github中推送。

我想在提交时回到状态 -

    commit 3ba2bfea5d7ad8ff4a83b23595c7a9841bc064b2
    Author: S. M. Abrar Jahin <abrarjahin@live.com>
    Date:   Sat Oct 10 13:31:08 2015 +0600

        Animation for removing item

所以,我曾尝试的是 -

  

git reset --hard 3ba2bfea5d7ad8ff4a83b23595c7a9841bc064b2

当我运行时,它说,“ HEAD现在是3ba2bfe动画,用于移除项目

但是我发现,当我提出这项承诺时,并不是州。

我能做什么,有人可以帮忙吗?

1 个答案:

答案 0 :(得分:1)

  

当我运行它时,它说,“HEAD现在在3ba2bfe动画中删除项目”。但我发现,当我提交时,并不是状态。

当您运行重置以及结帐时,您所在的分支现在位于3ba2bfe。如果内容不符合您的预期,那么您会错误地记住该提交。您可以通过签出该提交git checkout 3ba2bfe,查看内容或git show 3ba2bfe来查看差异来进行检查。

唯一的另一种解释是当你说“当我提交时不是状态”时“它”是别的东西。我假设你指的是你当地的分支机构。或者你在谈论Github上的分支?

相关问题