remote: error: hook declined to update refs/heads

  • 打开工程目录下.git/config文件,补充user信息 ,

      [user]

      username = xxx
      email = xxx@126.com 

  • 打开工程目录下.git/description文件,删除  Unnamed repository  后所有的内容
  • 提交一次代码,把上一次commit覆盖,更一个空格活一行空白行提交
  • 然后git push
原文地址:https://www.cnblogs.com/lanrumeng/p/12313395.html