预接收挂钩被拒绝:提交消息中未发现JIRA问题? [英] pre-receive hook declined: No JIRA Issue found in commit message?

查看:19
本文介绍了预接收挂钩被拒绝:提交消息中未发现JIRA问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已提交,正在尝试将更改推送到存储库,但出现此错误。

remote: refs/heads/feature/OMT-1270-Missing-French-Translations: cd54ab15bc8d5764ab12cf6fc202fd9e7d36294b: No JIRA Issue found in commit message.
remote:
To REPONAME
 ! [remote rejected]   feature/OMT-1270-Missing-French-Translations -> feature/OMT-1270-Missing-French-Translations (pre-receive hook declined)
error: failed to push some refs to REPONAME

我以前这样做过,它工作得很好。这张票也是有效的。为什么它一直抛出此错误?

回购为Bitbucket,原始提交消息为

git commit -m "OMT-1270 Adding missing translations"

推荐答案

很少有组织允许预挂接将任何内容提交到存储库。每当您忘记在提交消息中输入JIRA编号时,您都需要修改提交。

以下是要解决的步骤:-

1)使用"Git"导航到存储库目录位置 重击"

2)然后使用"git rebase -i"

执行REBASE

3)它给出一页 显示您以前的犯罪记录。

4)在关键字上单击"i"以获取 编辑模式。

5)无论您要修改哪个提交,请将单词从 "拾取以编辑"

6)单击"退出"以停止编辑。然后键入":wq!" 保存并退出

7)现在是时候逐一修改承诺书了 使用"git commit --amend"

8)编辑提交消息,添加您的 吉拉号。

9)单击"退出"以停止编辑。然后键入":wq!"以 保存并退出

10)对提交重复7、8、9个步骤,您拥有 选择编辑而不是拾取。如果仅编辑,则无需重复 一次承诺。

11)完成所有操作后,请执行"git rebase --continue"

12) 最后执行"git push"

# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label

这篇关于预接收挂钩被拒绝:提交消息中未发现JIRA问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆