I am currently working on the 'external_pub' branch. I made several changes in one file, added it, committed it, and then tried to click:
git push origin external_pub
But this led to an error:
remote: error: hook declined to update refs/heads/external_pub To ssh://XXX/testing.git ! [remote rejected] external_pub -> external_pub (hook declined) error: failed to push some refs to 'ssh://XXX/testing.git'
Then I tried to push the branch without any changes to see what was happening (only to isolate the problem). I have done the following:
git reset --hard <commit_id> (to reset to last working sha commit) git status
The above command showed:
# On branch external_pub
Then
git pull origin external_pub
He showed: your branch is already up to date
Then
git push origin external_pub
This time, he also showed the same error as above. Could you help me solve this problem?
source share