PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, July 12, 2022

[FIXED] How to reference issue (gitlab, github) at the beginning of the message with "$ git commit"?

 July 12, 2022     commit, commit-message, git, message     No comments   

Issue

I am trying to reference some issue at my commit message, I want to put the issue identifier at the beginning of the message, but also using some text editor to edit commit message (the command is git commit).

When I try this #10 my message here that line is ignored, because at editor all lines starting with # are ignored.

I already see this question here but here all examples only refence the issue in the middle of the message, or if it's at the beginning of the message all examples uses:

git commit -m "#10 my message"

How can I use the text editor and start the commit message with my issue identifier? I thinking maybe there is something like // or ! to inform that this line should not be ignored.


Solution

Don't forget the git config core.commentchar "*" that I mentioned here: you can change what character ignores a line in a commit message.

You can even change it just for your commit command:

git -c core.commantchar="*" commit ...


Answered By - VonC
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing