硬重置为之前的 git 提交 - 不工作

Hard reset to a previous git Commit - Not working

我有运行

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 用于删除项目的动画

但是我发现,这不是我提交时的状态。

我该怎么办,有人可以帮忙吗?

When I run it, it says, "HEAD is now at 3ba2bfe Animation for removing item". But I am finding that, it is not the state when I had made the commit.

您在 运行 重置 时所在的 b运行ch,以及您的结帐处,现在是 3ba2bfe。如果内容不是您预期的那样,恕我直言,您记错了该提交。您可以通过检查该提交 git checkout 3ba2bfe 并查看内容或 git show 3ba2bfe 来查看差异。

唯一的其他解释是当您说 "it is not the state when I had made the commit" 时 "it" 是另外一回事。我假设您指的是您当地的 b运行ch。或者你在谈论 Github 上的 b运行ch?