SourceTree Amend Commit question

Hi!

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).

Alex.

 

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 30, 2018 in Sourcetree

Tip from the team: configuring Git or Mercurial in Sourcetree

Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...

403 views 0 1
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