Git branching from an older revision and rolling back the current branch

I don't know Git all that well and for one of our repositories, I made a mistake.

I committed and pushed changes to a branch named "core". But then I realised that my changes should not be there - I should've created a new branch several revisions ago, say, "core-experimental".

To explain, I have:

A---B---C---D---E     "core"

But now I want to change it to

A---B              "core"
    \
     C---D---E     "core-experimental"

No one else in my team has pulled my changes yet, so any reverts I do shouldn't cause pain to anyone.

Is this possible for Git?

5
задан aberrant80 4 November 2010 в 04:18
поделиться