Deleting a branch in Visual Studio Online using GIT for Windows

When you use GIT branching becomes… attractive, maybe even addictive. Which is fine… then (as happened yesterday) you find that a branch really didn’t help in any way and you would like to delete that branch and pretend it never happened 🙂

I’m using the GIT capability of Visual Studio Online and was stumped with how to delete the branch. I managed to remove it from my local repository with ease – but not from Visual Studio Online.

The solution turned out to be very simple but (to me anyway) was not obvious.

Install GIT for Windows. Fire up the GIT Gui and then select the Delete Branch option from the Remote menu. Simple.


Is Visual Studio 2013 ignoring your .gitignore file?

Well, it was for me. Specifically I wanted it to exclude the nuget packages folder which in theory should have been as simple as uncommenting a single line in .gitignore.

Except… VS2013 (with update 2) insisted on still checking in the packages folder. Odd.

Turns out various folks have hit the same problem and the answer turns out to be pretty simple.

  • Close Visual Studio.
  • Navigate to your .git folder
  • Delete ms-persist.xml
  • Restart Visual Studio

And hey presto, all is well.

If you exclude the packages folder then you also need to enable nuget package restore  – check out this great walkthrough.

Lest I forget… Suspending ReSharper

ReSharper is awesome … but it also likes plenty of CPU and memory.

If you find yourself struggling on a virtual machine, then it is worth knowing that you can very easily suspend ReSharper.

There are nifty commands you can use from the Command window  such as ReSharper_Suspend (or map them to keys) as well as a big button under Tools.Options.