0

I've git cloned from remote branch to local and made changes on local ,then try to push back to remote.

When git pull origin remoteBranch, I get Already up to date., when git push origin remoteBranch, I get below error:

To xxxxxx.git ! [remote rejected] branchA -> branchB (pre-receive hook declined) error: failed to push some refs to 'xxxxxxx'

How can I solve this?

Thank you.

Lei
  • 11
  • 1
  • 3
  • A hook on the remote repository rejects your push. There are many reasons for that. The error message doesn't say what exactly it checks. It may be a matter of permissions, something related to the code or related to the repository itself (commit messages, branching names etc). Ask the owner or administrator of the remote repository to find out the actual reason. – axiac Jun 21 '18 at 08:12
  • You can utilized `git push --force` – Nicolás Alarcón Rapela Jun 21 '18 at 08:17
  • Thank you. Here's more detail of the pushing:Counting objects: 13, done. Delta compression using up to 8 threads. Compressing objects: 100% (12/12), done. Writing objects: 100% (13/13), 4.19 KiB | 4.19 MiB/s, done. Total 13 (delta 9), reused 0 (delta 0) remote: Resolving deltas: 100% (9/9), completed with 9 local objects. remote: check-email.sh: failed with exit status 1 remote: remote: 0d585xxxxxxxxxxxxxxxxxxxxxxxxxx author - non company email – Lei Jun 21 '18 at 15:33
  • I've fixed it by set up email and username. "git config --global user.email "myemail", "git config --global user.name "byname". then has to check git log to see if the latest commit was used by the latest author. if not, use "git commit --amend --author "username". – Lei Jun 21 '18 at 16:54

0 Answers0