Command line, Tips & tricks

Ultimate solution cleanup that always works

Quite often when you play with dependency updates or project configuration it’s needed to clean the solution. Especially if other teammates claim it works on their machine (or even on build server). Unfortunately neither “dotnet clean” nor “Clean” command in Visual Studio work as expected and sometimes leave some leftover.

Continue reading

Command line, Tips & tricks

Cleaning up git branches

In order to keep your git environment in a good shape you need to clean up branches from time to time. It is especially difficult in case of build servers which complete pull requests on behalf of developers (like VSTS). It’s easy when you have just a few branches to review, but if you forget to do some cleaning for longer while then it’s getting painful. For sure you do not want to remove effects of your work by accident during cleanup.

Continue reading

Command line

git console: changing brach interactively

Some time ago I wrote about some helpful script that let me copy branch name without mouse. Later on I wrote about some simple console menu in Powershell. The second one seems to be a far better option here. Here’s the code:

Continue reading

Command line, Tips & tricks

Investigating “git log” without mouse

As I’m a huge fun of doing the job using keyboard only, I’ve got addicted to VsVim, vim mode using CapsLock, then git console. Unfortunately there were still some actions that were “uncomfortable” like for example investigating “git log“. In order to copy a part of previous commit message or commit id I had to use both mouse and keyboard. Finally I have figured out that the solution is really simple: pipe the result to vim:

git log | vim --noplugin -

- is to tell vim to read from stdin
--noplugin is used to speed up load time and reset some strange behaviour, but you can live without it I think

As it’s not very short, best to have it as console alias:

doskey gl=git log | vim --noplugin -

Here you have some demo:


My journey to figure it out was not that straightforward, as I thought it should be some feature/plugin to my terminal (ConEmu at home, Console2 at work) – nothing found. Then I tried to use VIM as terminal (using ConqueTerm) but not everything worked there (i.e. Yeoman) and finally git commit opened “vim” inside of console in vim … “Vimception” ]:-)>

Finally we can use the same trick in several other places like
git branch – copy branch name for further use in git checkout
git status – copy file name to add/reset/checkout changes
and more…