Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding git commit message to all files (even unchanged)

Tags:

git

github

I would like to update every single file's commit message within GitHub at certain times.

Whenever I make a major upgrade (merging development into stable branch), I would like to commit and push my changes to GitHub such that all of the files, even those which have had no changes, have the same commit message.

Example:

  • Development is tested and ready to be merged into Master
  • Development is merged into master
  • Commit message "New Version: 2.0" is applied to all files (even unchanged files)
  • Master branch is pushed to remote (GitHub)
  • GitHub displays the same message ("New Version: 2.0") across every single file/directory

I could go through every file and add a newline to the end of the file, but I feel as though there may be a way to do this from git or github itself.

like image 279
earthmeLon Avatar asked Nov 29 '25 16:11

earthmeLon


2 Answers

If you want to track a point in time for things like released, use a tag instead. Don't "hack" the commit process like you suggest. How would you then find the real diff between checks?

like image 180
Cylindric Avatar answered Dec 02 '25 05:12

Cylindric


That's simply not how git works, adding nonsense to the history of all files is likely to be very counter productive whenever you need to review it.

You might find gitflow to be a useful read. You don't have to use it - but the explanation of workflow may help you understand how better to use git.

like image 23
AD7six Avatar answered Dec 02 '25 06:12

AD7six



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!