Git missing Change-Id in commit message footer解决方法
在Git向服务器提交代码时,出现如下错误
missing Change-Id in commit message footer
1
原因:项目仓库.git/hooks目录下,commit-msg文件缺失。
解决方法1:一般在提交代码报错时,会给出相应解决的提示。

remote: Processing changes: refs: , done
remote: ERROR: missing Change-Id in commit message footer
remote:
remote: Hint: To automatically insert Change-Id, install the hook:
remote: gitdir=$(git rev-parse --git-dir); scp -p -P xxxxx@xxxx:hooks/commit-msg ${gitdir}/hooks/
remote: And then amend the commit:
remote: git commit --amend

如上所示,依次在项目路径下输入如下命令,即可解决:

gitdir=$(git rev-parse --git-dir);
# 将xxxxx@xxxx 替换成相应用户名、服务器即可(该命令从服务器拷贝commit-msg文件)
scp -p -P xxxxx@xxxx:hooks/commit-msg ${gitdir}/hooks/
# 再提交一次即可生成change-id
git commit --amend

解决办法2:其实和上面的办法差不多,如果将当前项目留有备份,直接将备份项目的.git/hooks/commit-msg拷贝到,当前项目相应目录即可。

原文:https://blog.csdn.net/zxc024000/article/details/83824550

Git missing Change-Id in commit message footer解决方法的更多相关文章

  1. git推送代码问题之:ERROR: [abcdefg] missing Change-Id in commit message footer

    一.问题: 在日常的工作中,使用git推送代码时会出现以下报错,“missing Change-Id in commit message” : qinjiaxi:$ git push origin H ...

  2. git push ERROR: missing Change-Id in commit message footer

    今天上传代码时候报告错误:$ git push origin HEAD:refs/for/branch*Counting objects: 7, done.Delta compression usin ...

  3. git push 时:报missing Change-Id in commit message footer的错误

    1. 一般而言,按照提示执行以下两个命令即可生成新的Change-id - gitdir=$(git rev-parse --git-dir); scp -p -P 29418 guan@192.16 ...

  4. 解决 ERROR: missing Change-Id in commit message footer 问题

    提交代码操作 git push origin HEAD:refs/for/XXX,提示失败ERROR: missing Change-Id in commit message footer,丢失Cha ...

  5. remote: ERROR: missing Change-Id in commit message footer

    remote: ERROR: missing Change-Id in commit message footer [摘要:git 提交到近程版本库失足:remote: ERROR: missing ...

  6. Automatic merge failed; fix conflicts and then commit the result.解决方法

    产生原因: git pull 的时候会分为两步,第一步先从远程服务器上拉下代码,第二步进行merge.当你merge时候失败了就会产生Automatic merge failed; fix confl ...

  7. linux centos7 “git clone https://github.com/XXXXX” 报错解决方法

    2021-08-04 1. 问题描述 在执行以下命令时出现错误"正克隆到 'XXXXX'... fatal: unable to access 'https://github.com/lag ...

  8. git中Please enter a commit message to explain why this merge is necessary.

    Please enter a commit message to explain why this merge is necessary. 请输入提交消息来解释为什么这种合并是必要的 git 在pul ...

  9. git提示Please enter a commit message to explain why this merge is necessary

    Please enter a commit message to explain why this merge is necessary. 请输入提交消息来解释为什么这种合并是必要的(提交信息) gi ...

随机推荐

  1. OpenStack kilo版(1) 部署环境

    硬件 VMware workstation虚拟机 Ubuntu14.04操作系统 虚拟机网络规划 管理网络: eth0, 桥接模式 10.0.0.0/24 外部网络: eth1, nat模式(需要关闭 ...

  2. 免安装方式的Python之VSCode环境配置

    概述 本文旨在介绍免安装方式,在VSCode中搭建Python(3.73)的配置环境.至于Python是什么.它能做些什么,诸如此类的介绍均不在此文中介绍,相信能看此文的人,多多少少都会有些了解. V ...

  3. ant design pro超详细入门教程

    1.Ant Design Pro 初了解 说到ant design pro,得先了解一下ant design是个什么东西?ant design蚂蚁金服基于react打造的一个服务于企业级产品的UI框架 ...

  4. zabbix主动模式和被动模式

    目录 一. 理论概述 二.总结 一. 理论概述 整个zabbix监控过程当中,对于agent来说有两种递交监控项信息的模式:主动模式和被动模式 主动模式 agent向server主动请求对应监控项列表 ...

  5. ImportError: No module named yaml

    问题: import yaml ImportError: No module named yaml 解决: wget http://pyyaml.org/download/pyyaml/PyYAML- ...

  6. TightVNC安装

    软件版本:tightvnc-2.8.8-gpl-setup-64bit.msi 后面一路默认,虚拟机端口默认从5900开始递增.

  7. idou老师教你学Istio 22 : 如何用istio实现调用链跟踪

    大家都知道istio可以帮助我们实现灰度发布.流量监控.流量治理等一些功能. 每一个功能都帮助我们在不同场景中实现不同的业务.那么其中比如流量监控这种复杂的功能Istio是如何让我们在不同的应用中实现 ...

  8. synchronized 和 volatile 的区别是什么?(未完成)

    synchronized 和 volatile 的区别是什么?(未完成)

  9. 模拟一个http 请求的json格式报文,带 rsa 签名操作

    一.对需要加密的字符串,定义RsaSignUnsign 类,代码如下: 实现了: 1.实现了生成新的pubkey.pri_key方法: 2.将新生成的keys 写入文件: 3.从文件获取pubkey. ...

  10. JS export 异步导出

    function getUrl () { req().then(res => { console.log(res); }).catch(err => { console.log(err); ...