Wednesday, August 24, 2016

Visual Studio's most useful (and underused) tips

I discovered Map Mode for the scrollbar. I have seen people use that but always thought it was from a Visual Studio plugin.

Also, who knew you could compare files with Visual Studio?

Navigate to -- Ctrl+, -- is another discovery, as well as moving lines up and down with Alt-Up and Alt-Down.

Visual Studio's most useful (and underused) tips

Visual Studio's most useful (and underused) tips

Tuesday, July 05, 2016

GitTfs commands I use every day, round 2

I modified my script to display the name of the current branch. This is to aid in situations where feature branches are being used.

Here's the current script:

Thursday, May 26, 2016

The old 'TFS Repository can not be root and must start with "$/"' error

When using git-tfs to clone a repository using the bash shell, this error is common:
$ git tfs clone https://tfsserver/tfs/DefaultProjectCollection/ "$/path/to/tfs/project"
TFS repository can not be root and must start with "$/".
You may be able to resolve this problem.
The solution? Prepend MSYS_NO_PATHCONV=1 to the command, e.g.:
$ MSYS_NO_PATHCONV=1 git tfs clone https://tfsserver/tfs/DefaultProjectCollection/ "$/path/to/tfs/project"
Initialized empty Git repository in C:/Projects/path/to/tfs/project/.git/
Fetching from TFS remote 'default'...
C6782 = 81584efc08348f7dc4c81297e4e82115789a1e3d
C6784 = 6a6a8bd55111286b24c7acd4825e4ef79030d693
C6863 = 60e8369f34b16a6123d7ed22bf60e59db46ee2e9

Friday, April 15, 2016

TestDisk - Partition Recovery and File Undelete

I wish I'd known about this a few months ago. I accidentally make a disk unbootable, but eventually, after many hours of struggle, I got it working again. This might have save me those many hours.

TestDisk - Partition Recovery and File Undelete

I found this reading the original Server Fault post on the huge data loss allegedly suffered by someone at a British web hosting company.

Linux command line mistake nukes web boss' biz • The Register

centos7 - Recovering from a rm -rf / - Server Fault

Thursday, March 03, 2016

Cleaning Visual Studio solutions when using Git

Visual Studio has a "Clean Solution" command, of course, but it's conservative in what it cleans and sometimes leaves detritus around that most of the time you want eliminated. It seems to only clean files -- DLL's and PDB's, mostly, but also content configured to be copied to the output folder -- that are created by the current source code and copied references and other files. It also does not eliminate files created at runtime -- for instance error logs -- that your program may have created. One situation in which files are not deleted by the "Clean Solution" or the "Clean Project" command is when you remove an assembly or project reference from a project before you clean it. The removed reference remains in your project's output directory.

Let Git come to the rescue! Assuming that you have a sensible .gitignore file, the following command will delete all bin and obj folders from your project and all subprojects: