I recently did a hard reset of my local git repository: In other words I reset it to an earlier point in time. Now when I try to push up to the origin
it tells me that it can't because the origin
contains work of a later date than my repository. This makes sense, but I don't care about the work the origin has after my local repository.
If I first pull
, which is what I am told to do, I presume that my local HEAD
will then become whatever the origin
HEAD
was, i.e. with the additional work and my hard reset will be for nought.
How should I proceed here? To recap, I don't care about the additional later work on the origin, but do care about the extra work on the local done after the hard reset.
I am beginning to think that hard resets are not a great idea.