0

Yesterday, by mistake, I git pushed into my remote master and it created an untracked branch. Please see this comment.

To remove the diverged tracking branch (green line) I did:

git push -f origin ad8557d0f89e:master

The problem is that I am still seeing my old commits (one from the old untrack branch) when I issue the following command:

git rev-parse master
0da090c5cbde10ff19602a2722ae05231c30dff5

So, how to remove these commits? Or they do not matter?

I also did a git-pull to one of my local repos from my master branch when it had diverged (i.e: after diverging and before giving the git push -f origin command). So how should I tell me my that local branch to unsee those changes and see the second last git pull?

Community
  • 1
  • 1
mu_sa
  • 2,685
  • 10
  • 39
  • 58

1 Answers1

0

Ok, i found a way out of it. What i did is that i Reset my master and the other branch to the right version(commit) by reset option from the git gui (gitk)

mu_sa
  • 2,685
  • 10
  • 39
  • 58