If you have two commits that you haven't pushed, and you don't want them at all, then rather than reverse then, you should reset to the commit that want to start from and then pull.
So, I'm assuming that you have the following situation.
$ git log --oneline --graph
* fde0ba4 Commit 2 (don't want)
* d7be6f3 Commit 1 (don't want)
* 7a70e45 Before my new commits (start here!)
* db58591 Even earlier
...
And so on. You don't want the first two commits, but you want the the third onwards. The first step is to reset back to where you want to start from.
git reset --hard 7a70e45
Note that this is a destructive operation -- you'll lose those commits, and the content of those commits, so do this with care! See the git reset
documentation if you're not sure if --hard
is appropriate.
After resetting, you should be able to pull without a problem.
git pull