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. 【大数据】SmallFile-Analysis-Script

    1.root账号先在namenode节点上配置一个定时任务,将fsimage定时传到其他客户机上进行操作 whereis hadoop命令确定安装目录,然后去配置文件找到namenode节点(data ...

  2. 用mybatis将SQL查询语句”select * from user”的封装为配置文件

    用mybatis将SQL查询语句”select * from user”的封装为配置文件 定义一个xml映射文件,文件名见名知意.如user-mapper.xml,文件内容如下: <?xml v ...

  3. 【hadoop】细读MapReduce的工作原理

    前言:中秋节有事外加休息了一天,今天晚上重新拾起Hadoop,但感觉自己有点烦躁,不知后续怎么选择学习Hadoop的方法. 干脆打开电脑,决定: 1.先将Hadoop的MapReduce和Yarn基本 ...

  4. k2系列-安装篇

    K2介绍: K2是基于BPM的流程开发平台,它支持在net开发环境/visio/moss等不同环境下进行流程开发. K2本身部署简单,操作灵活,非常适合大中型企业流程开发和部署. K2安装步骤: 首先 ...

  5. 若干简单的进程和作业调度的C++模拟程序

    进程调度(时间片轮转,动态优先级,链表形式): #include<cstdio> #include<cstdlib> struct PCB { ]; char state; / ...

  6. split()函数实现

    #split函数实现: ss='** *axx* *bv** *ctt** **dff***' result=[] def split_1(ss,a,times=len(ss)): i=0 n=0 w ...

  7. CodeForces 768E SG函数 整数划分 Game of Stones

    一个标准的NIM游戏 加上一条规则:每堆石子对于每个数目的石子只能被取一次 可以SG打表 dp[i][j]表示现在有i个石子 j是可以取的石子数的状压 第i位为1就表示i个石子没被取过 #includ ...

  8. PHP获取不到url传递参数中#&等特殊字符解决方法

    有些符号在URL中是不能直接传递的,无法传入PHP处理,比如#&等符号,通过$_GET是获取不到的,比如一个域名https://localhost/url.php?url=yangyufei+ ...

  9. 通过AOP拦截打印日志,出入参数

    import java.lang.reflect.Modifier; import javassist.ClassClassPath; import javassist.ClassPool; impo ...

  10. Matlab step方法

    在Matlab中我们经常能看到Java的影子,即面向对象编程(Object Oriented Programming,OOP). 以Turbo编码为例: hTEnc = comm.TurboEncod ...