Last night, just before leaving the office, my development VM decided to crash unexpectedly.
Upon starting the machine the machine the following morning, and trying a git pull, I got the following error:

bad config file line 1 in .git/config

I CD’d into my .git directory, and opened up config in notepad
There was nothing in there, except for a load of whitespaces.
To fix this, I removed the whitespaces and saved the file.
Of course, this had lost my remote settings, but a quick git remote add origin <url> fixed this issue also

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:

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.

GUI Bug on TFS Shelve changes screen

When resizing the screen, you would also expect to see the file list to resize with it?


Apparently not….