Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Amend last commit message?

Liam Jones May 7, 2012

I messed up a commit message and and noticed before I pushed my local repo changes out so I wanted to edit the message. I couldn't find anywhere obvious to do this within SourceTree.

I just did it via the git command in the end (git commit --amend -m "correct message").

Did I miss the ability to do this in the SourceTree interface or is it simply not there?

1 answer

1 accepted

37 votes
Answer accepted
stevestreeting
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.
May 7, 2012

It's there, at the bottom left of the commit window, 'Amend latest commit' checkbox).

Liam Jones May 7, 2012

Ah! Thanks Steve. :) Stupidly, I didn't think of looking in the commit window - I was looking for something off of the newest log item's right click menu.

Stanley Kurdziel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 9, 2015

In version 2.0.5.2 on Mac, the option is now at the top right of the commit section. "Amend last commit" is the first option in the "Commit options..." dropdown.

Tommy Kye
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 11, 2018

Cool!

reybruno
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 10, 2019

Thanks! 

Marie Toulouse
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 4, 2019

still no graphic update for this feature on windows !!

Bill OLeary August 16, 2019

Thanks for this...

I have to keep coming back to this answer because the location of that option  is not really intuitive to me... 

I think it would better to have this option in the context sensitive menu which gets launched when right-clicking the  selected check-in in the history view.

shulif
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 19, 2019

I totally am unable to follow the "Ammend latest commit" flow.

I agree with Bill OLeory.

dheerajsvim11
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 3, 2020

Yes It worked for me in Mac

Select Commit -> It will open commit window -> Center Right -> Commit options -> Amend last commit 

Thanks Steve

BertjeBertje October 15, 2020

I got it working after a couple of tries, but this is rubbish. I even had to find out again, while reading my own description, which I improved.

  • One can't directly work on the commit itself with some button or option. One has to make a sort of ghost commit.
  • Possibly with some uncommitted files, one has to push 'Commit'. That was too scary to try, so I undid changes first.
  • So wit NO uncommitted files I had to push 'Commit' (top left)! Then find that option. Then get a popup in bad English: "Do you want to replace the commit text above with the message from the previous commit?" No, the other way around! And it is not 'above'.
  • And for some reason I had to try a couple of times because it did not work, the second 'Çommit' button was not enabled, or whatever. But probably I was misled by the popup which suggests it finalizes the action.
  • I just found out why. It isn't. One has to push commit options first, which changes a possibly entered text back. Then enter the new text. Then commit.
  • So again: this is rubbish. Please Atlassian, change this to something intuitive.
Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events