Question

I pushed a commit with one changed file to Github. This was the first (and only) commit to this repo, which was forked from another user. I then changed the commit message using

git commit --amend -m "New message."
git push --force origin master. 

When I look at the main repo page on Github, the amended message is displayed above the file list, but the message displayed next to file name is the original commit message. Is there any way to force the amended message to be displayed next to the file name?

Was it helpful?

Solution

It should be a simple refresh or cache issue, because if that file is part of the new commit you just forced push, it will pick up the updated commit message.

In the OP's case, it seems that GitHub main repo page incorrectly refect its first push, while the list of commits did listed the right SH1 (the second push, replacing the first through a git push --force)

It is a refresh issue at the GitHub repo side.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top