Locally ignoring changes with Git

It’s one of those little problems that I’ve been having over and over during my whole career: You have some local changes in your working tree, but you don’t want to commit them in the end. The files should be in version control, so .gitignore is not the solution. You promise yourself to be careful …

Referencing Gitlab issues in commit messages

Since recently I’m working on an open source project hosted on a Gitlab instance. We also manage project issues in Gitlab and in my commit messages I reference those issues, where appropriate. I do this by prefixing the commit message with a hashmark and the issue number. A commit message can look like that: #123: …

Cleanup of git branches

In our work projects we use a lot of git branches. Over time, the number of branches in my local repository grows and it gets more complicated to find specific branches. For this reason I like to cleanup untracked branches every now and then, and because this is only an issue every few months, I keep …