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?
This question is related to
git
github
commit
post-commit
For intellij users: If you want to make changes in interactive way for past commits, which are not pushed follow below steps in Intellij:
Hope it helps
You need to git push -f
assuming that nobody has pulled the other commit before. Beware, you're changing history.
For Android Studio / intellij users:
No, because the commit message is related with the commit SHA / hash, and if we change it the commit SHA is also changed. The way I used is to create a comment on that commit. I can't think the other way.
I was facing the same problem.
See in your github for a particular branch and you will come to know the commit id of the very first commit in that branch. do a rebase to that:
git rebase -i
editor will open up. Do a track of your commits from github UI and opened editor and change the messages.
git commit --amend
and press Enter.git push --force example-branch
command to force push over the old commit.Source: https://help.github.com/articles/changing-a-commit-message/
Source: Stackoverflow.com