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. MUI顶部导航布局

    一.头部 核心css mui-bar mui-bar-nav <header class="mui-bar mui-bar-nav"> <a class=&quo ...

  2. BP神经网络—java实现

    神经网络的结构 神经网络的网络结构由输入层,隐含层,输出层组成.隐含层的个数+输出层的个数=神经网络的层数,也就是说神经网络的层数不包括输入层.下面是一个三层的神经网络,包含了两层隐含层,一个输出层. ...

  3. jar下载及Maven配置整理

    Spring的各版本jar包下载地址http://repo.spring.io/release/org/springframework/spring/ springframework下载地址https ...

  4. 阿里P7浅谈SpringMVC

    一.前言 既然是浅谈 SpringMVC,那么我们就先从基础说起,本章节主要讲解以下内容: 1.三层结构介绍 2.MVC 设计模式介绍 3.SpringMVC 介绍 4.入门程序的实现 注:介绍方面的 ...

  5. Image Processing and Analysis_8_Edge Detection:Statistical edge detection_ learning and evaluating edge cues——2003

    此主要讨论图像处理与分析.虽然计算机视觉部分的有些内容比如特 征提取等也可以归结到图像分析中来,但鉴于它们与计算机视觉的紧密联系,以 及它们的出处,没有把它们纳入到图像处理与分析中来.同样,这里面也有 ...

  6. Linux磁盘管理——swap分区

    转自:Linux Swap交换分区设置 对swap分区的误解 一种流行的.以讹传讹的说法是,安装Linux系统时,交换分区swap的大小应该是内存的两倍.也就是说,如果内存是2G,那么就应该分出4G的 ...

  7. 个人推荐-几款好用的App

    前言 在使用智能手机的过程中比较喜欢尝试一些新奇好玩的app,同时也积攒下了不少个人认为很有帮助或很有特点的app,写这篇随笔当做一个记录吧. 便签-小周便签 一款功能十分强大的便签app,在编辑界面 ...

  8. 2018/7/31-zznuoj-问题 A: A + B 普拉斯【二维字符串+暴力模拟+考虑瑕疵的题意-0的特例】

    问题 A: A + B 普拉斯 在计算机中,数字是通过像01像素矩阵来显示的,最终的显示效果如下:  现在我们用01来构成这些数字 当宝儿姐输入A + B 时(log10(A)<50,log10 ...

  9. ggplot2入门与进阶(上)

    出处:http://www.cellyse.com/how_to_use_gggplot2_part1/ ggplot2包是基于Wilkinson在<Grammar of Graphics> ...

  10. LeetCode刷题--有效的括号(简单)

    题目描述 给定一个只包括 ' ( ' , ' )  ',  ' { ' , ' } ' , ' [ ' , ' ] ' 的字符串,判断字符串是否有效.有效字符串需满足: 左括号必须用相同类型的右括号闭 ...