Answer the question
In order to leave comments, you need to log in
Is it possible to change the messages of all commits in a repository?
The commits are old, long since pushed. But since I was just starting to work with git at that time, there is a mess in the messages. I want to replace all messages with "Init". Is it possible?
Answer the question
In order to leave comments, you need to log in
There are several options:
1) squash all unwanted commits
2) Through git rebase -i, change the message of each unsuccessful commit.
Both methods involve rewriting history, which is not very good, but if the repository is only yours and only you are working on it, then it will do.
UPD. Whenever you change history, save the state before the changes to a separate branch:
git checkout -b tmp
git checkout <your branch>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question