I'm git newbie, that's what I've done:
I've got working ngnix server with git hook, to which I'm pushing my project by: git push production master
command.
Now I pushed my set1
commit to the server, and later on I revert it hard on my computer, so I try to push again previous version: set0
My server respond me with:
To ssh://website/var/repo/site.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'ssh://root@website/var/repo/site.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.
What should I do now? I want to revert hard my set1
changes on server.
My configuration on server is in post-receive
file:
#!/bin/sh
git --work-tree=/var/www/laravel --git-dir=/var/repo/site.git checkout -f
but no active repository is there. Thank you for help!