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. UIApplicationDelegate里面最常用的几个函数执行顺序小结

    (1)点击桌面图标正常启动App或者杀死进程后点击推送消息启动App 1.application:willFinishLaunchingWithOptions 2.application:applic ...

  2. GC案例

    FGC----jmap -histo:live导致 线上某服务的老年代配置了CMS,但却在gc.log发现连续Full GC的问题.JVM参数配置如下: -XX:+UseCMSInitiatingOc ...

  3. Java字节码常量池深入剖析

    继续来分析Java字节码,上一节分析了魔数的规则,接下来继续往下分析,其上次总结的规则也一起贴出来: 1.使用javap -verbose命令分析一个字节码文件时,将会分析该字节码文件的魔数.版本号. ...

  4. java之数据结构与算法

    1.了解基本数据结构及特点 如,有哪些二叉树,各有什么特点 树二叉搜索树 每个节点都包含一个值,每个节点至多有两棵子树,左孩子小于自己,右孩子大于自己,时间复杂度是O(log(n)),随着不断插入节点 ...

  5. 解决python中调用 imread 报错:ImportError: cannot import name imread

    安装了scipy后,报cannot import name imread错误, 1.网上查阅资料后说是需要安装pillow,安装pillow之后,仍然报该错误, 2.网上说是pillow与SciPy安 ...

  6. ubuntu下编辑文本命令

    常见的基于控制台的文本编辑器有以下几种: emacs           综合性的GNU emacs 编辑环境 nano              一个类似于经典的pico的文本编辑器,内置了一个pi ...

  7. 10—mybatis 通用mapper插件 pagehelper 分页

    spring boot真的太好用了,大家以后多多使用,今天来说说pagehelper 来做mybatis分页,我用的是spring boot 做的开发,后面会把源码发出来. pagehelper(ht ...

  8. 关于EZDML数据库表结构制作设计工具使用踩的坑

    我使用的是一款EZDML的数据库表结构制作设计工具 最开始在数据库创建数据库名为personalmall,基字符集为默认,数据库排序规则也是默认,创建完成之后 去EZDML生成SQL 点击执行sql ...

  9. linux学习-添加多个硬盘和lvm配置

    原文 一般,服务器会有多个硬盘,一块硬盘分区安装操作系统,另外多块硬盘分区做存储使用.现在测试添加多块硬盘分区,使用lvm进行实现动态磁盘分配. 1.新增硬盘查看 fdisk -l 可以看到新增的两块 ...

  10. 「数据结构与算法(Python)」(二)

    顺序表 在程序中,经常需要将一组(通常是同为某个类型的)数据元素作为整体管理和使用,需要创建这种元素组,用变量记录它们,传进传出函数等.一组数据中包含的元素个数可能发生变化(可以增加或删除元素). 对 ...