Splitting up a commit in Git

My last post got fairly positive feedback, 77% upvotes on Reddit. But in the comments I was asked to add an important practical use-case, how to split commits. So instead of editing my previous post, I decided to make a new post demonstrating how I would do that.

Continue reading

Interactive rebase in Git

Rebasing in Git is basically replaying commits on top of each other. But with interactive rebase you are in control of how they should be replayed and what should be done with them. You can re-arrange them, skip them, reword them, edit their changes and squash them together. This is a very powerful tool.

Continue reading

How to use bisect in Git

There’s a method in Git that can become very useful when working in large projects where it is hard to find where bugs originated from. This is the git bisect command and allows you to find by binary search the change that introduced a bug.

Continue reading

Isolating your BLL from your DAL and unit testing it

This article will teach you how to set up a basic service and repository, to isolate your BLL (Business Logic Layer) from your DAL (Data Access Layer), so you can easily create unit tests for your BLL. This solution doesn’t use any ORM (Object Relational Mapping) like e.g. Entity Framework. This is only to explain how to isolate logic from data and how to test your logic in isolation.

Continue reading

How to mock and test WCF services using Moq

I really needed to mock and test WCF services for a new project I’m working on. I had heard great things about the Moq mocking framework so I decided to use that.

Continue reading

Aliases in Git I couldn’t be without

Let’s face it, Git is pretty raw, but it has the options to do cool stuff. That’s why I decided to make a post with the aliases I use all the time and couldn’t be without. Continue reading

How to commit the right way in Git

Most people write commit messages explaining in short what is in their commit, which in the long run tells other people NOTHING about the commit without having to go through the diff of the commit. But there is a better way to do this. Continue reading

.NET Config Transforms and how they are useful

Config Transforms are a nifty method to have your configuration vary, depending on which build configuration you are running or what servers you are publishing to. This gets the most useful when you’re deploying to many kinds of different servers; Development, staging, production, etc.

Continue reading

How I handle changelogs using Git tags

I decided to write about how I handle production changelogs with Git using tags. After bunch of commits to my dev branch and when everything has been tested thouroughly, I merge it to master branch.

Continue reading

Reset IDENTITY field in SQL Server with RESEED

I was trying to reset the IDENTITY value of a table. The problem was I had a foreign key constraint so I couldn’t TRUNCATE the table. That would have solved my problem though.

Continue reading

© 2019

Theme by Anders NorenUp ↑