commit-message | quick little macOS utility to make writing commit messages
kandi X-RAY | commit-message Summary
kandi X-RAY | commit-message Summary
This is a tiny, fast commit message editor.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of commit-message
commit-message Key Features
commit-message Examples and Code Snippets
Community Discussions
Trending Discussions on commit-message
QUESTION
I repeatedly caught myself calling git log
before git commit
to see what were the last commits before making a new one.
Is there a way how to automatically populate the commented-out section of the git commit
message in the editor with the output of git log
? Perhaps even with some options like -n5
? Right now, it shows the branch and staged files.
Very similar with git: Show index diff in commit message as comment question but --verbose
does not show the logs.
I use vim as my editor if it is relevant.
...ANSWER
Answered 2022-Mar-10 at 14:27The commit message can be customised using the --edit
and --file
options. A hyphen can be used with the --file
option to read additional commit message text from stdin. This didn't work well for me with vim; maybe because it was not invoked as vim -
.
Bash process substitution seems to work though:
QUESTION
Assuming I have a pom.xml containing a parent dependency like this:
...ANSWER
Answered 2022-Feb-14 at 22:57With xmlstarlet:
While you can use --if
and --else
for xmlstarlet sel
(see https://stackoverflow.com/a/35671038/2703456 for example), I don't think you can use them for xmlstarlet ed
. I hardly ever use xmlstarlet
, so I'm not entirely sure.
That means you'll have to do it in Bash...
QUESTION
I'm trying to get started using semantic commit messages according to the Angular convention https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
But still can't find the right commit type when installing a new dependency in my project. In the end, it should end up like : install storybook
. What type should I use?
ANSWER
Answered 2021-Dec-24 at 06:16Since this commit changes the dependencies, the build
type seems to be the most appropriate type.
Having said that, a commit that just adds a dependency without doing anything with it doesn't sound like a good idea, as it's not an atomic improvement to the codebase. In fact, that single commit worsens the codebase by adding an unused dependency. Instead, I'd create a larger commit that introduces the dependency and does something meaningful with it, meaning it will probably be a feat
commit.
QUESTION
I've been wondering is it possible to change the message that appears in the input field when you commit on Github. Refer to the picture below:
I like my commits to be as descriptive as possible and enjoyable to read. I want Github to suggest 📝 Create README
instead of Create README.md
.
When I search for the solution, the 'google search' shows irrelevant answers. Is it somehow possible?
Note: This does not answer my question.
...ANSWER
Answered 2021-Dec-06 at 22:19If you can do this at all, it certainly won't be easy. The GitHub web interface is proprietary software that does not provide a setting for you to make this change. You might be able to create a UserScript in your browser using TamperMonkey (or similar) that detects the fields on the page and modifies them, but you'll have to write all the logic and then keep changing it whenever GitHub makes changes to their code.
Note that your suggested commit message that contains emoji is not actually more descriptive than their default message, in fact many people will find it less readable.
QUESTION
I have a static blog setup and every time I want a new post I have to commit and push a .md file. This is part of a group, so I was wondering if there is a way to automate the commit and push part every time a new .md file is saved to a google drive folder.
The first part is covered by IFTTT, where every time a new file is uploaded, a new issue is created on github containing the link to the file in the body.
However, I don't know how to create the action that will now download the file, create a new branch, commit and push the file to that branch and finally set up a pull request for me to approve.
If you know of any other way of automating this process I am open to suggestions!
Thanks!
Edit1:
I am not really sure how to complete this (including generating a random number where I wrote . Here's what I have so far:
...ANSWER
Answered 2021-Nov-19 at 17:15Updating your workflow to add the random number could be achieved using an output variable. I also think you need to add the actions/checkout
action to your repo to access the downloaded file.
QUESTION
I have a declarative pipeline that uses a kubernetes agent.
...ANSWER
Answered 2021-Sep-09 at 13:50In the "git fetch" command which worked, the following parameter was used:
QUESTION
I have two GitHub Actions in the same repo. I'm trying to update one from the other, but I get the following error when trying to commit and push the changes:
! [remote rejected] HEAD -> some-branch (refusing to allow a GitHub App to create or update workflow .github/workflows/the-other-action.yml without workflows permission)
This is a simplified version of the GH Action I'm trying to run:
...ANSWER
Answered 2021-Aug-26 at 17:10You need to use a Personal Access Token with workflows permission here, instead of the GITHUB_TOKEN
which has a defined scope.
Moreover, if this ${{ secrets.GITHUB_TOKEN }}
is your PAT, there might be a problem because you can't add secrets with the GITHUB_ prefix. So you would have to rename the secret following this syntax.
QUESTION
I am creating a script to do a Pull request using the below Azure CLI script.
az repos pr create --description $PR_Description --merge-commit-message $PR_WorkItemNo --org $orgname --source-branch $PatchName --target-branch "main" --title $PR_Title --project $projectname --repository $PR_repository --work-items $linkedworkitemno
Assigning a single work item (eg "72076") to this variable $linkedworkitemno - works fine and associates the single work item to the PR.
But when I add two work items with space (eg "72076 72126") - as explained in MS Docs (- --work-items - IDs of the work items to link to the new pull request. Space separated https://docs.microsoft.com/en-us/cli/azure/repos/pr?view=azure-cli-latest#az_repos_pr_create), it is not linking both items to the PR and only associates the FIRST work item.
can you please help me with this query?
...ANSWER
Answered 2021-Aug-02 at 12:56Please to it as follows:
QUESTION
I have an angular project where I want to enforce conventional commits. I have not been able to successfully had the right hook to prevent incorrect hooks.
I started with this tutorial, where it said to add the following to package.json:
...ANSWER
Answered 2021-Apr-14 at 09:50It seems like there was an issue running npx husky add .husky/commit-msg 'npx --no-install commitlint --edit $1'
because the command part was more than one word. A workaround I found was to split it up into two parts.
1 - Call npx husky add .husky/commit-msg
This created an empty/ default file in the right place with the following content:
QUESTION
In a company, we have a project that we are working on for some time already. In this project we use git for versioning. We are trying to make our git workflow more professional and more easy to collaborate. One of the steps we want to take is automatically generate a changelog, e.g. with generate-changelog. This package requires that the commits our formatted following the Angular commit message format.
I will be happy to write all the commits in the future following this format, but we still have a lot (a couple of hundreds) of commits that do not follow this format. In the meanwhile, I want to have the changelog generated automatically.
Is there a way to generate the changelog automatically, although old commit messages do not follow the required format? Or could we possibly 'update' the commit message such that we do follow the required format?
In case you need more info, let me know and I will update the question accordingly.
Update:
I want to prepend all old commit messages with some text like: docs:
. Interactive rebase as suggested here and in the answer below does work, but only if you have a few commit messages. I am looking for a way to change all commit messages at once. An exmaple that I did not get to work yet can be found in this SO question/answer.
ANSWER
Answered 2021-Mar-25 at 16:12Well, considering you don't want to write a changelog file for your actual history, the option would be change old commit messages.
As explained in the linked answer you should run git rebase -i HEAD~n
, where n
is the number of commits you want to change. The --root
flag can be used instead of HEAD~n
to choose the whole history in the rebase
command, as shown here:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install commit-message
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page