5
I’m trying to learn Git and in the middle of my tests I made a push incorrect for Github.
I did the reset of the latter commit and tried to give a push again thinking that it would remove the commit on Github, but it was a mistake:
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:Ferreira-Jefferson/StarWarsRepo.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
How I correctly undo the last push made for Github? And how have I ever made one reset, what I must do now?
Did you pull before trying the new Push? First from a "git pull" and then try "git push" again
– hugocsl