Git bash how to change (default) directory

Do you want to know how to change directory (folder) in Git Bash? In this post I’ll explain how to do just that, along with the answer to the more specific question of how to change the default home directory in git bash. Additionally I’ll cover which git bash command to use to list all … Read more

.Net Core Visual Studio git ignore bin and obj folders

I’ve been building a .Net Core API recently and after getting the repo set up I realised there was a problem. The bin and obj folders had been pushed to the remote branch, so once our build was kicked off, it was failing. It transpires that there’s an issue with the Visual Studio git ignore … Read more

C# Dictionary – select key value pair

Key value pairs pop up everywhere in C# code, and yet after twenty years of being a software developer I still find myself Googling ‘C# how to get a value from a key value pair‘ on a regular basis whenever I am working with a C# Dictionary. I like writing posts about things I cant … Read more

Categories C# Tags

How to rename a git branch

What is git branch rename? Is that even a real git command? No it isn’t, but it is pretty easy to rename a git branch and this post will show you how. I’ll also have a detailed example of exactly how to rename your git master branch to main. Look at this screenshot of my … Read more

Git stash changes – how to stash changes

If you’ve just realised you’re working on the wrong branch and you’ve already made changes, then this post could be for you. Picture the scene, you’ve edited a few files you’re half way through building a shiny new feature and then it dawns on you that you *forgot to create a new feature branch* before … Read more

Git delete local branch – and how to delete the remote branch

If you follow a typical git workflow you will probably have been developing each feature, or fixing each bug, on it’s own branch, and then merging each branch into a central development branch in the remote repo. In this kind of scenario at the end of a project you may have many local branches that … Read more

How to change the display name in Git bash

I share screen shots quite a lot in my blog posts and got fed up of needing to blur the user name information from my Git bash terminal screenshots. So I edited the shell prompt text in order to customise Git bash. Here are the steps you need to take in order to edit the … Read more