I now that executing this:
git reset --hard shaCommit .
I will take back my code to a specific previous commit, but, How can I push that? Let's say that my 4 last commits are rubbish and I want to go back to a specific commit, but I'm getting this error when I try to push:
$ git push
To ssh://git@uk-gitlab.almuk.corp/warlocks/capexbaar-web.git
! [rejected] development -> development (non-fast-forward)
error: failed to push some refs to 'ssh://git@uk-gitlab.almuk.corp/warlocks/capexbaar-web.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.