Coming from using Git, I am used to using a stash in this scenario:
Working on a piece of functionality
High priority change comes in on the branch I’m working on that would affect the above work
In this instance, I would tend to stash my changes.
After googling, I discovered the TFS equivalent is Shelving.
So, I shelved my changes, and was horrified to see them still in existence in my source tree…
I’d forgotten to untick the “Preserve pending changes locally” checkbox:
So from here, I have two options:
Shelve the changes again, making sure I untick “Preserve pending changes locally”
Delete the previous shelveset
Simply undo pending changes on the files included in the first shelveset.