SourceTree Amend Commit question


I am using Source Tree on Windows and trying to undo some of the changes to the file (php file).

I select the commit and right click on it choosing "Rebase children..."

A window is shown for interactive rebase.

I check "Amend Commit?" tick box and click OK.

A progress bar is shown and then nothing happens.

Am I doing something wrong?

Because according to some of the information I have seen, a new window should appear where I can modify commit (not the message, actual files).



2 answers

Seems like you are doing this a very complicated way. Right-click the commit you want to undo, and click "Reverse commit..."

This is a composite commit (contains many other changes). I need to undo only specific changes.

So I do as described in that thread. I get "uncommited changes". I create new commit with option "amend last commit". I get the following error: git -c diff.mnemonicprefix=false -c core.quotepath=false -c "sequence.editor='C:\Program Files (x86)\Atlassian\SourceTree\stree_gri'" -c "core.editor='C:\Program Files (x86)\Atlassian\SourceTree\stree_gri'" rebase --skip Rebasing (2/5) rebase in progress; onto 9cf6b39 You are currently rebasing branch 'master' on '9cf6b39'. nothing to commit, working directory clean The previous cherry-pick is now empty, possibly due to conflict resolution. If you wish to commit it anyway, use: Otherwise, please use 'git reset' Could not apply 3fadaf05f8b5c697c8c6d7ff69aa846bb7f5eb04... v3.6.6 (braces for if statement) Completed with errors, see above.

I just added custom action with `git reset --soft HEAD~1` and it worked like the same “Undo” in GitHub for Mac.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you