Questions tagged [commit-message]

The message associated with commits in a version control system.

Questions marked with this tag may be:

  • about style/how to write helpful messages
  • related to automated commit hooks (be sure to include a tag for the version control system you're using)

Related Tags

Useful Links

132 questions
4
votes
1 answer

change template for commit message in vs code

Im am using VS Code to write commit messages. When I type git commit -a VS Code starts up with this text: # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On…
Hade0011
  • 81
  • 3
  • 10
4
votes
1 answer

Is it a bad practice to write multiline commit messages on git?

My commit messages on git usually look like the following: * Fix bug abc * Refactor xyz * Document 123 * ... I'm wondering whether this is a bad practice and I should prefer one-line commit messages or at least provide a header line. On the other…
4
votes
2 answers

Is it a good habit to write TODO to commit message?

I just realized that I prefer writing TODO notes directly in to the latest commit instead of issue tracker, for example: TODO: - Remove console.log - Check that XY works - ... For example if I have to switch to another job, finishing it and coming…
bimlas
  • 2,359
  • 1
  • 21
  • 29
3
votes
1 answer

git: need to parse commit messages looking for pattern and storing in list

all of my git commit messages start with refs #SOME_NUMBER where SOME_NUMBER is a number from 1 up. I would like to parse all commmit messages on my working branch, store all of the SOME_NUMBERs in a list, remove duplicates, and save to file.…
Jacko
  • 12,665
  • 18
  • 75
  • 126
3
votes
1 answer

Are special characters in the body of a commit message allowed?

I used special characters like "" and <> or ' in the body of my commit message, is this allowed or should i use text only ? I didnt find a real answear, and i dont want to f up my github history, so an answear would really help me out!
Trxsh
  • 35
  • 3
3
votes
1 answer

svn: revision file lacks trailing newline

I wanted to commit a change in a file that is under subversion control: svn ci some-file -m "some-comment" but I receive a svn: Commit failed (details follow): svn: Revision file lacks trailing newline from a quick search on the internet, I was…
René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293
3
votes
1 answer

How can I require a ticket number in the commit message during the push to GitLab?

gitlab has a feature where if I put a ticket number in the commit message then the commit will be associated with the ticket on gitlab.com. This is really handy when doing code reviews. Unfortunately the developers sometimes forget to do this. I…
Be Kind To New Users
  • 9,672
  • 13
  • 78
  • 125
3
votes
1 answer

git commit: pre-populate commit subject but still prompt for a commit message

Let's say I'm working on a branch and I run git commit. I am then taken to the commit message prompt where I may enter a commit subject and message. What I'm looking for is a way to have the commit subject pre-populated while still being able to…
buratino
  • 1,408
  • 2
  • 17
  • 40
3
votes
1 answer

Git count filtered commits

Is it possible to get a number of git commits filtered by commit-message? $ git log --all --grep='SEARCH_STRING' With this snippet I get a list of all commits with the searched string. But I got a lot of commits and its hard to count this by…
3
votes
1 answer

Sublime Text line wrap and commit messages

I use Sublime Text (3) for my default Git commit message editor. I try to follow Git conventions using a hard limit on the number of characters per line (50 for the first line and 72 for the rest). I currently have guides set up at those intervals…
RedBassett
  • 3,469
  • 3
  • 32
  • 56
3
votes
1 answer

Git commit message with letter #

I have a little problem. In our company we have an agreement that all commits that related to some issue in bug tracker should start with # (for example, #8956). But git ignores all of the lines that starts with letter '#' when writing…
DeGriz
  • 318
  • 3
  • 15
3
votes
1 answer

How to see the content of a commit when rewording its message using 'git rebase'?

I'm fixing some commit messages of a series of commits. I start git rebase --interactive mark some commits for rewording and then edit the messages. It'd be really helpful if I could see the diff of each commit in the editor, just like when doing…
Petr
  • 62,528
  • 13
  • 153
  • 317
2
votes
1 answer

Git: How do I edit the message of a previous commit that is not the latest one?

I just realized that I left one word in the commit message of a previous commit (so I can't use git commit --amend) that makes the message mean completely the opposite of what I had intended. The commit in question is HEAD~2 on my current branch,…
David Sanders
  • 4,069
  • 1
  • 24
  • 38
2
votes
1 answer

Informative message for reverting multiple git commits

When reverting multiple commits using git revert -n f0000000 git revert -n baaaaaaa is it possible to ask git to mention in the new commit message all the commits you've reverted, not just one of the commits? I'm on git version 1.6.3.3, so…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
2
votes
0 answers

Templates for log messages at the moment of commiting a change

I use Subversion. When I try to commit a change in a repository, and forget to write a comment as part of the parameters (parameter -m or --message), a text editor opens and tells you to write a comment regarding the change. Is there a way to add a…
lamcro
  • 6,069
  • 18
  • 57
  • 70
1 2 3
8 9