SourceTree Amend Commit question

Alexander Kucheryuk January 27, 2015

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

0 votes
Даниил Пронин April 16, 2015

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

0 votes
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 27, 2015

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

Alexander Kucheryuk January 27, 2015

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

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 27, 2015
Alexander Kucheryuk January 27, 2015

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events