0 votes
1 view
in Devops and Agile by (20k points)

Is there any way of online editing the commit message in GitHub.com, after submission?

From the command line, one can do

git commit --amend -m "New commit message"

as correctly suggested in another question.

Trying git pull and then git push has worked (without any other commit having interfered in the mean time).

But can it be done via the GitHub website?

1 Answer

0 votes
by (28.4k points)

No, this is not directly possible. For every Git commit the hash is also calculated based on the commit message. Remember that changing the commit message will change the commit hash. In case you want to push that commit, you have to force that push (git push -f).

Keep in mind that if other developers in your already pulled the old commit and started to work based on that commit, then they would have to rebase his work onto your new commit.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...