discard multiple files in SourceTree

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

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.

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.

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

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.

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

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