Basj
Basj

Reputation: 46313

Change lots of commit messages

I transferred my gist and all its revisions into a git repo thanks to this great Github import feature.

But now all the commit messages are empty:

No commit message
UserA committed on GitHub 27 days ago

How to change the commit message of all these 9 or 10 commits, one month later?

(Is it possible directly in Github's website?)

Upvotes: 1

Views: 87

Answers (1)

ckruczek
ckruczek

Reputation: 2410

Well you can use git rebase -i HEAD^8 to interactivly change the messages. This will open an editor and you can change the commit messages and you change the word pick to reword and can now reword every single commit message. Be aware that this action rewrites your whole history which means you have to do git push --force to update the remote repository.

By doing git push --force you will update the remote history as well, which means that contributer have to re-pull or even re-clone the repository to integrate the new history which can lead to horrible merges or even loss of changes.

Upvotes: 1

Related Questions