commit-message

Should I use past or present tense in git commit messages? [closed]

∥☆過路亽.° 提交于 2019-11-29 18:31:06
I read once that git commit messages should be in the imperative present tense, e.g. "Add tests for x". I always find myself using the past tense, e.g. "Added tests for x" though, which feels a lot more natural to me. Here's a recent John Resig commit showing the two in one message: Tweak some more jQuery set results in the manipulation tests. Also fixed the order of the expected test results. Does it matter? Which should I use? mipadi The preference for present-tense, imperative-style commit messages comes from Git itself. From Documentation/SubmittingPatches in the Git repo: Describe your

How do I create a SVN Commit Message Template and Hook to Verify

本小妞迷上赌 提交于 2019-11-28 21:12:14
I'm using Visual SVN Server and Tortoise SVN (client) for source control. I would like all developers to standardize on a consistent format for checkin notes. For Example I want their Commit Message to default to... Synopsis: Developer Name: (pre-populated) Reviewed By: [Bug Id]: [Change Bug State]: Known Issues: Affected Files: (pre-populated) In the future I'd like [Bug Id] and [Bug State] to supply the information to trigger an automated update to the Bug Tracking system. Also Developer Name and Affected Files should be prepopulated with the svn user and files that the user is commiting.

How to skip the commit message step in “git commit --amend”? [duplicate]

痞子三分冷 提交于 2019-11-28 17:42:17
This question already has an answer here: How to amend a commit without changing commit message (reusing the previous one)? 5 answers I'm running a very rapid code-compile-test loop where I am amending changes to my commits far more often than not. For example: # Make some changes $ git commit -m "Added feature X" # Compile, test # Fix bugs $ git commit -a --amend I usually want the same commit message after I fix my bugs. Is there a way to make git skip firing up my EDITOR and just use the original commit message? You can just add --no-edit to use the last message. This option existed since

Git: How to reuse/retain commit messages after 'git reset'?

白昼怎懂夜的黑 提交于 2019-11-28 15:13:56
问题 As Git user I regular come across the situation, that I need to rework one or more commits in a way which do not fit into --amend or rebase -i with fixup commits. Typically I would do something like git reset HEAD~1 # hack, fix, hack git commit -a # argh .. do I need to retype my message? I take sensible composed commit messages quite serious. They typically contain larger text with references & justifications for the change. Until now, I'm quite annoyed on the lengthy process to recover my

Should I use past or present tense in git commit messages? [closed]

房东的猫 提交于 2019-11-28 13:07:59
问题 I read once that git commit messages should be in the imperative present tense, e.g. "Add tests for x". I always find myself using the past tense, e.g. "Added tests for x" though, which feels a lot more natural to me. Here's a recent John Resig commit showing the two in one message: Tweak some more jQuery set results in the manipulation tests. Also fixed the order of the expected test results. Does it matter? Which should I use? 回答1: The preference for present-tense, imperative-style commit

Print git commits body lines joined in one line

谁说胖子不能爱 提交于 2019-11-28 08:38:28
问题 How can I print git commits to print only body (commit message without title) but in one line? So commit body lines are joined, possibly separated with space, and printed as one line for one commit. For example, with two commits A and B, command: $ git log --format=%b prints: Commit A, line A.1 Commit A, line A.2 Commit B, line B.1 Commit B, line B.2 But I'd like to get: Commit A, line A.1 Commit A, line A.2 Commit B, line B.1 Commit B, line B.2 回答1: git rev-list master | while read sha1; do

How do I create a SVN Commit Message Template and Hook to Verify

佐手、 提交于 2019-11-27 13:36:04
问题 I'm using Visual SVN Server and Tortoise SVN (client) for source control. I would like all developers to standardize on a consistent format for checkin notes. For Example I want their Commit Message to default to... Synopsis: Developer Name: (pre-populated) Reviewed By: [Bug Id]: [Change Bug State]: Known Issues: Affected Files: (pre-populated) In the future I'd like [Bug Id] and [Bug State] to supply the information to trigger an automated update to the Bug Tracking system. Also Developer

How to skip the commit message step in “git commit --amend”? [duplicate]

半腔热情 提交于 2019-11-27 10:24:46
问题 This question already has an answer here: How to amend a commit without changing commit message (reusing the previous one)? 5 answers I'm running a very rapid code-compile-test loop where I am amending changes to my commits far more often than not. For example: # Make some changes $ git commit -m "Added feature X" # Compile, test # Fix bugs $ git commit -a --amend I usually want the same commit message after I fix my bugs. Is there a way to make git skip firing up my EDITOR and just use the

How to edit incorrect commit message in Mercurial? [duplicate]

牧云@^-^@ 提交于 2019-11-26 23:28:23
This question already has an answer here: Mercurial: how to amend the last commit? 7 answers I am currently using TortoiseHg (Mercurial) and accidentally committed an incorrect commit message. How do I go about editing this commit message in the repository? Thilo Update: Mercurial has added --amend which should be the preferred option now . You can rollback the last commit (but only the last one) with hg rollback and then reapply it. Important : this permanently removes the latest commit (or pull). So if you've done a hg update that commit is no longer in your working directory then it's gone

Print commit message of a given commit in git

北城以北 提交于 2019-11-26 19:31:33
I need a plumbing command to print the commit message of one given commit - nothing more, nothing less. It's not "plumbing", but it'll do exactly what you want: $ git log --format=%B -n 1 <commit> If you absolutely need a "plumbing" command (not sure why that's a requirement), you can use rev-list : $ git rev-list --format=%B --max-count=1 <commit> Although rev-list will also print out the commit sha (on the first line) in addition to the commit message. git show is more a plumbing command than git log , and has the same formatting options: git show -s --format=%B SHA1 Harshniket Seta This