Setting up Git to ignore changes on existing config files

Git is a powerful tool for version control and managing changes in code. One of my main issue on using it on real projects, are config files. I couldn’t just add them to the .gitinore-file, because I needed them to be there, but I didn’t want them to accidentally be included in any commits and screw up the working copies. While looking for a fix to this issue, I stumbled upon an option to tell git to ignore changes on specific files: git update index --skip-worktree <file1> <file2>. ...

March 7, 2023 · 2 min · Marcel Jurtz

Git Workflows

Almost all programming projects work with some kind of version control. When I started to work with Git, I used the tool also directly for my private projects. But especially at the beginning I found it hard to structure my commits and branches in a practical way. For this reason I would like to show you some common strategies today, the so-called Git Workflows. Simple Workflow The simple workflow consists of a single master branch. There is only this one branch to which changes are pushed. This workflow is only suitable for very small projects, e.g. private ones, where only you work on yourself. As the team grows, this workflow becomes very messy and you’ re going to have to deal with a lot of merge conflicts. ...

September 30, 2018 · 3 min · Marcel Jurtz

Introduction to VCS

When you start learning to program, you rarely think about how you will be able to work on a project at the same time with other people. By the time your side projects take on larger dimensions or you work in a team, you will be confronted with the topic of version control. Version control is basically the management of source code, so that several developers can work on the same files at the same time. The sense of a system for monitoring changes can be easily understood by an example: ...

June 23, 2018 · 5 min · Marcel Jurtz

Using GitHub over SSH on public WIFI

When using GitHub via SSH, port 22 will be used per default. However, often times you’ll see this port being blocked on public WIFI networks. On a Linux machine, there is a simple way to change the default port. To test if our plan works out, you can use the following command: bash >ssh -T -p 443 git@ssh.github.com This will test the ssh connection by using port 443. If this returns a positive result, you can change the port in your ssh config file. ...

January 29, 2018 · 1 min · Marcel Jurtz

Advanced Git - Git Stash

In my introductory post on git, I told you that git uses three areas to track changes. Well, maybe I lied to you in this case. There are actually four areas available and I will cover this fourth area in todays post. The fourth area is called Stash. Basically, it works like a clipboard to which you can save current changes. Concepts of the Stash … Imagine the following scenario: You are working on a change. In the middle of your work you remember that you also wanted to do something else. This other change is important and should be handled immediately. However, it cannot be implemented with the uncomitted changes you are currently working on. In short, you need the status of the last commit, but you don’t want to discard your current changes and you also can’t commit them yet. ...

January 8, 2018 · 2 min · Marcel Jurtz