It goes like this:
I have files A and B that I modified
I'm only suppose to commit and push A, but accidentally committed both and pushed both A and B
I did a "git push old-id:master" so on github it shows "Master is now old-id" where old-id is the last commit before me, so i think it's back to before i committed.
Question:
Note: I do need to keep the changes for both A and B on my local though. The end result should be:
$ git reset <old-id> # Undo the commit after old-id
$ git add A # stage A for a new commit
$ git commit # make the new commit
$ git push # push it