Question

I have committed my changes and pushed them to the remote git repository. But when I have pulled others changes to my master branch, It merged my repo and I didn't have my old chnages. There is something wrong with the pull request I have merged. Now I want to go to my stable commit which was made by me. Accordign to this git log, I want to go back to the "Final Integration" commit.

Here is the git log :

commit dc1276f241db392eb7785a655d6493c7cbdf712e Merge: 0dd1453 e3281ec Author: mehulkaklotar Date: Fri Nov 1 04:01:27 2013 +0530

Vivek - Ranu Changes

commit 0dd14530bbbde1b4c7f00f4add96c2957ac9e373 Author: mehulkaklotar Date: Fri Nov 1 03:53:40 2013 +0530

vendor menu - client place order (partial)- mehul

commit 5a3d6e8f3b2f257c46d43352f190c14dcd98b5fc Author: mehulkaklotar Date: Fri Nov 1 02:42:01 2013 +0530

Final Integration

commit e3281ece42ef5d049dc3f0958c7e611956183b84 Author: vshukla8991 Date: Thu Oct 31 08:23:42 2013 +0530

Commit: Changes by Vivek and Ranu

commit df8d19a478b11c6631e1b4dd8b5acef00dff7499 Author: vshukla8991 Date: Wed Oct 30 15:53:43 2013 +0530

Commit: Changes by Vivek
Était-ce utile?

La solution

Do a git reflog you will see something like this

[some hash] HEAD@{[head pointer number]}: commit: Changes by Vivek 

note down the [head pointer number], then do

git reset --soft HEAD@{[head pointer number]}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top