Fix a commit in a snap

This time around here’s a simple way to fix a commit in the middle of your history before sharing it. The idea is to correct the existing commit and not to add new commits. (Thanks Aurélien for the idea!) How it works Let’s take the example of a working...

One worktree per branch

New week, new tricky problem! Who has never needed to test two features offered by two different branches, at the same time or almost … Apart from cloning  the project twice, running its tests and making any corrections that you forget to push to the server at...

I want to keep my modifications locally!

Here’s a problem to solve: I’m working on a code repository including a configuration file. This file is provided by the upstream project. I need to modify it locally for my tests but I definitely don’t want to commit my modifications and even less...

The staging area in all its states

Oops, I’m late in writing my articles. Let’s go back a bit this time to the fundamentals of the commit workflow with git. Here we attack my war horse, my fixed idea, my obsession … The good practices of commit! They often sound like the painful...

Git: plumbing and porcelains

The number of git users is increasing, personal use, in business … But to have observed the profile of a few hundred trainees during git training, I would say that overall, 80% said they have already used git since some months. And of those 80%, less than 1%...

Cloner un dépot git à partir de templates

Une fois la plomberie posée, commençons par le début et la création ou la récupération d’un dépot. Pour récupérer un dépot hébergé en local ou sur un serveur distant, rien de plus simple, c’est la commande git clone git clone <url du dépot>...