how do I change a git commit message in bitbucket
I need to change an old git commit message in BitBucket. I tried git rebase -i
and reworded my message but when I pulled and committed it just kept the old message in BitBucket and merged my changes in.
It's basically 4 step process. But a bit risky if multiple team member are working on the same branch and have their own copies. (If you are the only one working on it, go for it)
This git manual explains it beautifully: Amending older or multiple commit messages
git rebase -i HEAD~X
(X=No of commit messages you want to change) git push -f
I don't know if you can change the commit message but you can make a comment under your commit message.I think this is somehow a change in your comment. You click on your commit message's number and beneath your message you can make any comment you want. Then a "K1" sign will appear next to your message which means that you have one comment in your message which will remind you that you changed your message... I hope this will help you...
If it is the most recent commit, you can simply do this:
git commit --amend -m "modified commit message"
(amend message) git push --progress origin --force
(force push) Be careful using --force
or -f
! Bad things might happen...
Force pushing is strongly discouraged since this changes the history of your repository. If you force push, people who have already cloned your repository will have to manually fix their local history.
And here you can find documentation on git commit and git push.
链接地址: http://www.djcxy.com/p/49852.html上一篇: 推一个固定的提交Git?