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
6
votes
3 answers

Git: change HEAD commit's message without touching the index

I know that I can use git commit --amend --file=path-to-my-new-message but this will amend staged changes, too. Of course, I could stash and later apply&drop the stash, but is there a quicker solution to change the HEAD commit message without…
Mot
  • 28,248
  • 23
  • 84
  • 121
6
votes
2 answers

XCode: Commit failed in SVN : No space left on device

Hi, I am committing my project in SVN using XCode. I do it successfully for quite a few months. But suddenly today, while committing, it is showing the following error : The working copy "Classes" failed to commit files. svn: Commit failed (details…
utsabiem
  • 920
  • 4
  • 10
  • 21
6
votes
1 answer

How to access git commit message INSIDE sh STEP in a jenkins pipeline?

I need to access commit message of current fetch from git repository, while completing some sh steps of different stages of a pipe in jenkins; but I didn't find any proper solution for it. It would be also nice if I could set the commit message as…
Ehsan Khodarahmi
  • 4,772
  • 10
  • 60
  • 87
6
votes
4 answers

Proper Commit Messages

What are commit messages for? I've always been writing them as an explanation of what I did, but I've recently gotten into a discussion about it with a colleague who writes commit messages explaining why he did. Which one is right, or is there…
Clark Gaebel
  • 17,280
  • 20
  • 66
  • 93
6
votes
2 answers

How do you access the commit message in a Mercurial in-process hook?

I've been trying def debug_hook(ui, repo, **kwargs): changectx = repo[None] ui.status('change.desc: %s\n' % changectx.description()) return True But it always prints an empty string. Is this because it is a precommit hook and the…
davidavr
  • 14,143
  • 4
  • 27
  • 31
6
votes
8 answers

How might I force our developers to enter notes when committing via TortoiseSVN?

I often see a slew of commits, but no notes referencing the tickets... And so I end up going back and reviewing the diff manually. Not necessarily bad, but it would be nice to have notes. Any ideas?
Satchel
  • 16,414
  • 23
  • 106
  • 192
5
votes
1 answer

Should I write the reasoning in the commit message or an inline comment?

I've often heard that the commit message should describe why I'm making these changes. And I think I agree with that. However, I've also often heard that inline comments (i.e. comments in the source code) should tell why the code works in this…
Korthout
  • 371
  • 3
  • 12
5
votes
2 answers

Trigger build in Jenkins/Hudson using hashtag in commit-message

Is it possible to trigger a Hudson/Jenkins build only when a certain string appears in a commit-message? For instance, I want to trigger a build that rolls out my application to the dev environment by writing a commit message like: MYPROJECT-123…
5
votes
3 answers

VSCode as Git editor on Windows Subsystem for linux (WSL)

Context System Information (Windows) OS Name: Microsoft Windows 10 Pro OS Version: 10.0.17134 N/A Build 17134 ... System Type: x64-based PC Processor(s): 1 Processor(s) Installed. …
5
votes
1 answer

Is "Merged in" a commit message created by bitbucket, or git?

The style guide "How to Write a Git Commit Message" section 5. Use the imperative mood in the subject line states that git itself uses the imperative mood: The imperative can sound a little rude; that's why we don't often use it. But it's perfect…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
5
votes
6 answers

What is the use of commit messages?

I struggled asking that question but here it is. I am using source control since several years for multiple projects using different systems (svn, hg, git) and I learned how to improve my messages by following guidelines etc. But as far as I can…
ericteubert
  • 4,531
  • 3
  • 31
  • 35
5
votes
4 answers

If git commit messages written in the imperative, how do I clarify what hasn't yet been done? 'Don't add hashing' or 'Didn't/Doesn't add hashing'?

I'm still not totally clear about the way git commit messages are supposed to be written. I know the basic rules, but this one confused me. In my practice project, I created a login system and a user signup, but had not yet implemented secure…
user3888177
  • 85
  • 1
  • 8
5
votes
3 answers

Commit message prefix in git

I have a requirement to prepend "ticket:N" to commit messages, where N is the number of the ticket I'm working on. But I keep forgetting about the prefix and remember about it only 5-6 commits later, so --amend won't help. Is it possible to set some…
evgeniuz
  • 2,599
  • 5
  • 30
  • 36
4
votes
1 answer

How to validate and enforce commit message in Mercurial?

What are all steps required to validate commit message with set of regular expressions? We want to work in semi-centralized set-up so I need a solution for the developer clone (local repository) and for our central clone (global repository). I read…
Michal Sznajder
  • 9,338
  • 4
  • 44
  • 62
4
votes
1 answer

How to auto-accept git's default commit message?

My git workflow goes like this: git add . git commit git push I would like to know if there are git commands that let me accept the autogenerated commit message (after removing the # of course). The closest answer I've found is this, but it gives…
NNN
  • 697
  • 1
  • 5
  • 15
1 2
3
8 9