0

I wanted to try out resetting to a specific commit locally. After doing a "git pull", I've done a "git reflog" to get the hash of the commit prior to doing the pull. Then, i tried doing a "git reset --hard hashTagIgotFromReflog". I recieved a message that the head is was now pointing to my target commit but when I checked back on SourceTree, I saw beside my "developmental" branch that it has 147 for push and 142 for pull. I wanted to attach an image but I need to have at least 10 reputation.

why do I need to push "147" and pull "142"? what's the worst could happen if I tried pushing.

Please ignore the conflict and other branches. I'm only concern with the developmental branch having those numbers.

  • I don't think you want `git reset --hard` at all. It sounds more like you want a new branch that splits off from master using hashTagIgotFromReflog as the branch point. – chepner Dec 11 '14 at 18:46
  • I'm not sure about that, but unfortunately I already DONE it and thats the result. The problem now is what's up with those numbers and what do to do next as pushing those might destroy the remote repo. – Romar Ybanez Dec 11 '14 at 19:04

1 Answers1

0

If you will push your this commit and your server branch is ahead of this commit you will be asked for a rebase and there will be a merging issue. You can do a rebase pull at this level and make your local commit ahead of server commit. Or if you are using gerrit with git you can abandoned the server commits ahead of your commits and push the latest one.

Suhail Mehta
  • 5,514
  • 2
  • 23
  • 37
  • I'm sorry, but I don't understand what you mean. I've just reset to a commit prior to pulling one commit that has an update to a single file. please refer to this image, http://postimg.org/image/4fyqxfgrl/ – Romar Ybanez Dec 11 '14 at 07:53