discard multiple files in SourceTree

Tommy Chuang July 8, 2012

Is there a way to discard multiple files at once in SourceTree? Sorry if this is obvious but I've been looking all over the place and the only place to discard is on the diff panel on the right, which only discard one files even if multiple files are selected.

3 answers

1 accepted

10 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.
July 8, 2012

This is a terminology issue - in the toolbar and on the right-click menus the operation is called 'Revert' in Mercurial, and 'Reset' in Git. You can use the toolbar button of this name, or multi-select files and right-click them to get the operation for that set.

'Discard' was used in the diff view because the action didn't map exactly to these Git/Mercurial commands, since it could do hunks and lines too. It's not ideal to have similar outcomes called different things though, I might get rid of Revert/Reset and rename them to Discard too for clarity, even though Discard isn't actually a git/hg command name.

jimothyc March 6, 2013

Steve,

I also found this confusing. May I suggest renaming to Discard? In Git, "Reset" isn't really the right term, either, because two Git commands are actually used: reset and checkout. So if using the underlying SCM term was the motivation, that mark wasn't really hit.

Like eldes likes this
_Stav_ April 4, 2016

Note that for new files, 'reset' is not option. You need to select new files separately and select 'remove'.

Like tanura likes this
0 votes
CthulhuJon November 18, 2016

You can batch select and discard in windows,  just not on mac sourcetree.

0 votes
jimothyc March 6, 2013

Steve,

I also found this confusing. May I suggest renaming to Discard? In Git, "Reset" isn't really the right term, either, because two Git commands are actually used: reset and checkout. So if using the underlying SCM term was the motivation, that mark wasn't really hit.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events