how to change the commit message in source tree

pruthvi raj chowda January 19, 2015

i had put a wrong JIRA task number in the commit message and committed and pushed the changes to bitbuket using source tree,  so now i want to change the committed message.  

1 answer

1 vote
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2015

You need to amend the commit (press commit and then choose amend from the commit options above the commit message).

Afterwards, you need to force push to the server, because you are rewriting history. You cannot do this with SourceTree and the server might also stop you from doing it, because it is a potentially destructive operation.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2015

Yes, and if other users have pulled your changes, their workflow will be disrupted as well. Stackoverflow already has information on how they can recover. Please make sure to read both answers to that question: http://stackoverflow.com/questions/6898317/git-pull-analogous-to-opposite-of-git-push-f

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events