I have two repository, one bare server and the other on my car.
I want to undo the changes of the last two commits.
doing git reset 6fa93cb0a07c9b9b5dbd03d5dfa861c1fe23afc8 //reset to the necessary revision
doing git pull
I naturally respond
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'email@example.com:/repositories/repo.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
If I do git pull I have back those branches that I do not need.