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

how do I discard multiple uncommited changes in sourcetree

Andrew Lee May 13, 2014

dear all,

looking for a solution to the question above as I have multiple uncommited changes (1631 in fact) that I wish to discard everything at one go.

any solution would be greatly appreciated thanks!

5 answers

1 accepted

2 votes
Answer accepted
Bhushan Nagaraj
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 13, 2014

Hey Andrew,

Sourcetree expects you to check all the files that you would like to discard. With 1631 changes and no option to "Check all" files, I think git command line is your simpler option.

You can use the commands:

git reset

git checkout .

git clean -fdx

Refer to http://stackoverflow.com/questions/14075581/git-undo-all-uncommited-changes

Cheers

Bhushan

Andrew Lee May 13, 2014

Hi Bhushan,

Noted on this thank you so much for the reply! will certainly try it out and revert you!

Andrew Lee May 13, 2014

Hi Bhushan,

I've run the commands already and it works on my CLI but how do I reflect the changes in my working copy in sourcetree's GUI?

Apologies as I am really new to sourcetree thank you!

1 vote
cellepo June 29, 2016

'Reset' your branch to your last commit:

  1. Right-click the last commit -> 'Reset <branch name> to this commit'
  2. 'Hard - discard all working copy changes' option.
1 vote
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.
May 13, 2014

Did you try the Discard button? The popup that comes up has a "Reset All" button that you may find useful.

Andrew Lee May 14, 2014

Hi Seth,

Bhushan and your advice worked for me thanks!

Tom Lynch
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!
July 25, 2016

I highlighted all the files and selected discard. It came up and showed the differences with a discard changes button on the bottom right and when I click it, it pops a window that says "At least select one file". How? I have highlighted them but there is not check box.

WTF an interface should be intuitive. I'd stick to SVN and Tortoise but my company choose this wack-oh system.

Wish they'd hire professionals to design their interfaces.

Like Marilyn Horn likes this
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.
July 25, 2016

Based on other questions, it sounds like the latest version of SourceTree is missing checkboxes in many parts of the UI. You can downgrade to an earlier version until this is fixed, or use a different tool. SourceTree is just one of many available UIs for Git/Mercurial.

John L_ Stanley January 18, 2017

Good grief.  The "Reset All" tab should be relabeled to "Discard All".  I thought it was a shortcut to something that would reset the dialog settings...

Tom could be more tactful, but he does have some good points.  I'm sure all the functionality the designers intended is in there somewhere, but it is NOT always obvious how to get things to work.  There are far too many places where certain implications/connotations of specific function-names are not intuitive to someone who doesn't KNOW the system.

The whole GUI could use a professional review by someone who does NOT know how it works.

Like carrie_neustar likes this
Seth January 23, 2017

There are definitely parts of the UI that could be more intuitive, the Discard/Reset button being one of them.

However, since SourceTree is a GUI frontend for 3rd-party command line software (Git or Mercurial), many decisions are constrained by the need to remain consistent with that (especially with terminology). 

0 votes
Deleted user March 8, 2021

.

0 votes
caxix June 19, 2019

As of version 3.2 make sure one of the Workspace tabs is selected and try to use the Reset... context menu. It it can't be enabled, try checking at least one unstaged file. When active the Reset... command also shows a Reset All option.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events