When I create a new GitHub repository from my GitHub template, the first git commit message is automatically set to this:
Initial commit
How can I override this? I couldn't find a way to change the initial commit message in the settings.
When I create a new GitHub repository from my GitHub template, the first git commit message is automatically set to this:
Initial commit
How can I override this? I couldn't find a way to change the initial commit message in the settings.
It is possible to do this with a GitHub Action that defines the on.create
field like this:
# The workflow will run only when `use this template` is used
on:
create:
See how I managed to do this in my foundry-template project.
As mentioned in the comment by @torek, you cannot change the commit message from GitHub Web app directly, you can do it once you clone it in your system using a cli using git rebase -i --root
. You can refer to this video for instructions
Below is the steps you need to follow:
git rebase -i --root
pick
with reword
:wq
on your keyboard (to write and quit) and hit Enter
:wq
on your keyboard
git push --force
--force
.