Filed Under

Articles on development. Anything about developing software that I like to share with the world.

The only way to force push with git

Using “git push --force” is really evil. You force your current state of a local branch upon the remote branch, no matter what. Even if some commit got pushed right before your force push, it would be overwritten without any notice at all! Unfortunately with a rebasing strategy you can not avoid it.

Read More

Working in parallel with git worktree

Frequently I am working on a large commit having many changed files or running a precarious debug session or time consuming test. But some other urgent task comes by forcing me to switch branches. Today I was running a time consuming test so I had enough time to investigate out how I could update another branch and push a commit to origin.

Read More

Find lost commits with git reflog

Sometimes I get a very worried person at my desk, thinking he just screwed up bigtime and lost some important commit he made. When you think your work has been lost for good due to some git commands you executed, think again! Git tracks everything and actually never really loses a commit…

Read More

Finding errors with git

A while ago someone notified me that my website had broken by a change I made. “I got a tip for you! You should check it out with git bisect” and so I did. It was great to learn such a nifty feature of git. I shared my experience with some other git users but none of them knew about git bisect.

Read More

Git pull dissected

By default almost everyone is using “git pull” to update their local branch. When someone has forced pushed the result of a rebased to a repository, executing a simple “git pull” will often give you merge conflicts. What is going on and how should you get to the latest truth to continue working?

Read More

Tricking reflection with ICustomTypeDescriptor Interface

In the .NET Framework using reflection was always a bit cool when you needed it to solve a problem. Of course you have the performance penalty in mind when using it. Querying objects at runtime and even call properties and execute methods on that object, that’s awesome! But what about having an interface that answers those queries?

Read More

Patching with Git

I am working on a windows laptop, so getting jekyll to work correctly seems to be troublesome. So before pushing changes to my repository, I would like to check them on a jekyll docker image running on my NAS. Using the “git format-patch” command, we export out commits and apply them on our jekyll docker image to build and html-proof our site.

Read More