Questions tagged [commit-message]
The message associated with commits in a version control system.
135
questions
-1
votes
1
answer
68
views
Git hook commit message regex [closed]
I want to use a Regex in git commit message so that only commit messages in certain format should be allowed. I want the user to enter commit message in the format .
Example BLGR-1234 BUG Alignment ...
1
vote
0
answers
38
views
Can a specific line of source code be referred in commit message in git?
Can a specific line of source code be referred in commit message in git?
I am trying to mention a specific line having bug in the source code in the commit message and explain how I have debugged that ...
0
votes
0
answers
19
views
fixing a commit message that isn't the last commit
I make a mistake in my commit message in GitHub. what I have done
I navigated to the directory where I wanted its commit message to change.
To make vs code my default editor I ran this: git config --...
0
votes
1
answer
190
views
How to commit without message in Git?
I know that GitHub highly recommends to use messages BUT I work on semi-public projects with my brother and we are working in the same room so obviously we don't need any comments to our commitments. ...
0
votes
0
answers
49
views
How to fetch modified files path in git commit message template file for vs code
I am trying to add an alias to my .gitmessage.txt template file that will automatically add all modified files in the current repo to the commit message.
I create this file in my project folder. and i ...
1
vote
1
answer
421
views
Skip jenkins stage if tag appears in the commit message
I'm trying to skip some stages in a Jenkins pipeline if something like #no_build or #no_unittest is in the commit message.
I wan't to skip the Unittest stage if #no_unittest is present in the commit ...
0
votes
1
answer
90
views
Extracting Revision numbers in svn
I am trying to create a pipeline on jenkins which takes the code from a svn repository , builds it (using MSBuild) , tests it , creates a package from the build artifacts (using Maven) and then ...
3
votes
1
answer
1k
views
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 ...
1
vote
1
answer
1k
views
On bitbucket, is there a way to edit the commit message for squashing and merging into the develop branch?
I have made a few commits in the feature branch. Then I used squash to combine all the commits, and merged back to the develop branch.
However, I want to edit the commit message (on BitBucket) since ...
0
votes
0
answers
798
views
Why does a "/" in commit message break semantic-release?
I noticed that when using semantic-release/commit-analyzer plugin in gitlab ci, if there is a "/" in the commit message this breaks semantic release resulting in the following "error&...
5
votes
1
answer
693
views
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 ...
16
votes
3
answers
3k
views
Backticks in git commit message
I did
git commit -m "Changed function name `sum` to `sum_list`"
My intention with the backticks was that sum and sum_list be typed in a monospace font when someone views the commit message ...
1
vote
1
answer
381
views
why not to use passive voice in commit?
I am not a native English speaker. I have a question about the commit message.
I would like to use passive voice in some situations.
I think it is reasonable enough to use passive voice in some commit....
1
vote
3
answers
2k
views
How add new empty-lines in the message of one-line command "git commit -m"
If I want to not use any text editor and put all the commit message including subject and body lines into the useful one-line command:
$ git commit -m 'message including subject and body lines'
, I ...
0
votes
1
answer
277
views
Git get file list in prepare-commit-msg hook
I want to write a hook that prepares a commit message based on the paths of the changed files. Is it possible to get such a file list at that stage?
I checked the githooks manual entry, but it is ...
1
vote
1
answer
49
views
Github action build trigger for docker image with specific command in commit message
i am using github action to build my project via docker image plugin, my main branch is master branch so i wanna trigger my build only if there is special message in commit message for ex [ci build], ...
2
votes
0
answers
58
views
Rebase git tree keeping revert references
I have a couple of branches with many commits (~20-30) and some of them revert earlier commits from the same branch.
I now need to rebase those branches on current HEAD but I want to keep the revert ...
2
votes
1
answer
281
views
Setting a commit message / update comment when editing a page with Atlassian Confluence Python API
I am using the atlassian-python-api to update a page as described in the documentation:
from atlassian import Confluence
conf = Confluence(url=srvr, username=usr, password=pswd)
page_id = '12345'
...
2
votes
1
answer
2k
views
git: how to get commit message (exactly) of commit?
How can I extract the commit message (and only/exactly the commit message) of a commit?
git show https://git-scm.com/docs/git-show doesn't seem to have an option for that
I could do git cat-file -p &...
1
vote
1
answer
1k
views
git-filter-repo callback commit or callback message and --preserve-commit-hashes not working?
I'm trying to update commit messages but on same time to keep the same hash.
i try both options --message-callback and --commit-callback but no mater which one i choose, it generates new hashes.
Here ...
4
votes
1
answer
839
views
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). ...
0
votes
2
answers
695
views
WebStorm: continue merge with generated commit message after resolving conflicts
I tried to merge one branch with my current branch and got some conflicts.
I manually resolved them and clicked apply.
WebStorm tried to continue merge but failed because of my pre-commit hooks, which ...
0
votes
1
answer
79
views
Could git open vim editor at line N whenever we are creating commit?
I working in a project where each commit in a branch MUST start with
Story PRJCT-NAME-42 Task description
And must contain a message like this
Story PRJCT-NAME-42 Task description
foo bar ...
0
votes
1
answer
81
views
can I restore the commit message along with a stash?
Visual Studio 2019 Team Explorer has a new feature that allows me to stash my current changes.
When I invoke it (with or without --keep-index) it uses the current content of the commit message window ...
5
votes
1
answer
5k
views
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,...
21
votes
4
answers
4k
views
Commit type before feature is done
Conventional Commits defines several types for commit messages like feat, fix, chore, ci etc.
My question is about the workflow if I'm working on a feature whose scope spans several days of work. As ...
1
vote
3
answers
1k
views
Change git merge branch conflict message [duplicate]
After merging a branch with a conflict git autogenerates the commit message which looks like:
Merge branch {branchname} into {branchname}
Remote repo which I am currently working with got commit ...
3
votes
1
answer
1k
views
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. ...
1
vote
1
answer
553
views
Commit message file missing in commit-msg hook
I'm trying to write a commit-msg hook to format my commit messages to wrap at a maximum column width:
#!/bin/bash
format_max_column_width() {
MAX_LINE_LENGTH_CHARS=50
cat "$1" | grep -v "^Bug: |...
2
votes
0
answers
27
views
Git: How to reuse commit message (both subject and description) [duplicate]
How to reuse past commit's message while pushing new commit to the branch so that both subject and the description are retained?
When I am typing
git commit --reuse-message=<commit_ID || commit_ref&...
7
votes
1
answer
13k
views
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 ...
14
votes
2
answers
4k
views
Git magic keywords in commit messages (Signed-off-by, Co-authored-by, Fixes, ...)
Git command itself supports the Signed-off-by: Person's name <persons@email> line.
GitHub adds Co-authored-by: line, which then shows both the committer and the referenced person as commit ...
1
vote
1
answer
55
views
How to recognize multiple-dot file types for sublime syntax selection
I would like use sublime for my Mercurial commit messages, so I set
HGEDITOR="C:\Program Files\Sublime Text 3\subl.exe" -w -n a
This will start Sublime with a file named something like hg-editor-...
12
votes
1
answer
9k
views
What is "add files via upload" commit message in GitHub repositories?
I see lots of repositories in GitHub with this commit message: Add files via upload.
But I couldn't figure out how this (probably) automatic commit message is made. I looked around to find a clue, ...
4
votes
1
answer
3k
views
Is it a bad practice to write multiline commit messages on git? [closed]
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 ...
2
votes
1
answer
3k
views
How to set commit message template in Eclipse
Reading this article
https://medium.freecodecamp.org/level-you-up-to-awesome-commit-messages-a85558cb90e8
I wanted to set my commit message template to show few comments to remind me of writing ...
0
votes
1
answer
495
views
How to prevent no commit message in Source Tree?
Seems that we can commit with no message in Source Tree, but I want others not to do it in my project.
1
vote
1
answer
1k
views
Best way to apply regex policy to BitBucket Cloud commit messages?
Is there a way to implement a commit message policy on BitBucket Cloud?
From my understanding, the webhooks only work as commit notifications and can not intervene with the commits (to deny the commit ...
3
votes
1
answer
2k
views
git commit: pre-populate commit subject but still prompt for a commit message [duplicate]
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 ...
1
vote
1
answer
83
views
Cherry-pick with customized old SHA-1 line automatically
If I cherry-pick original commit deadbeef with -x, Git would append a line like
(cherry picked from commit deadbeef)
Is there any way to customize this message? Like I prefer
Backported from: ...
2
votes
3
answers
368
views
Should I hard-wrap SVN commit messages
In the Git user community it's a widely adopted practice to hard-wrap commit message bodies to 72–76 character width; everybody knows this and tools like 'git gui' usually make it clear that hard-...
6
votes
3
answers
7k
views
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
vote
1
answer
306
views
Git vim editor config
I work in windows and I use vim like default editor for commit.
I would like configure vim to save the commit with Windows file format (CRLF)
How I can do?
Where is the vim configurations for git?
5
votes
2
answers
9k
views
Is it a good habit to write TODO to commit message? [closed]
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 ...
1
vote
1
answer
424
views
How to reference issue (gitlab, github) at the beginning of the message with "$ git commit"? [duplicate]
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 ...
-1
votes
1
answer
1k
views
Get file name from commit message in git
In git some days back (Around 1 month) i pushed wrong files to repository with a commit message 'Test' .
In local system i want to see those files with commit message 'Test' in a particular branch ....
3
votes
1
answer
302
views
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 ...
0
votes
1
answer
324
views
ERROR: fatal: failed to stat 'HEAD^^^^^^^^^^^^^^^^^ Filename too long
I copied a repository (which had some not committed changes)
$ git checkout -b feature/servicing/pal4_Migration2
M .idea/libraries/tsconfig_roots.xml
M ui/dev/pages/AbstractChecks....
9
votes
2
answers
2k
views
Print git commits body lines joined in one line
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.
...
1
vote
1
answer
2k
views
Jenkins Gerrit trigger plugin gives encoded GERRIT_CHANGE_COMMIT_MESSAGE and GERRIT_EVENT_COMMENT_TEXT
Jenkins Gerrit trigger plugin gives encoded values for GERRIT_CHANGE_COMMIT_MESSAGE and GERRIT_EVENT_COMMENT_TEXT
How do I decrypt it - to make it human readable?