Little Git Tricks: Find the Last Common Commit in 2 Branches

If we want to find the newest commit that is in our main and in our feature branch, we can use this Git command:

1fe43981b856bkk8958494949494949494493339 This gives us the hash of the commit that is in both branches (in my example 1f439***). We can then see the details of that commit with git log: …

Read more

NDC Oslo 2023: My 10th NDC

Last week I was in Oslo to attend the NDC conference. I cannot really believe that this was already the 10th NDC Oslo I attended. With 2’600 attendees it was the biggest NDC event ever, but at least for me not the best.   Practical Clean Architecture workshop with Jason Taylor I started my NDC …

Read more

Little Git Tricks: Fix a Dubious Ownership of a Repository

If something goes wrong with the permissions of your Git repository, you may end up with an error like this:

fatal: detected dubious ownership in repository at ‘C:/my/Repo’ To add an exception for this directory, call: git config –global –add C:/my/Repo Set the environment variable GIT_TEST_DEBUG_UNSAFE_DIRECTORIES=true and run again for more information. If …

Read more

How to Delete All Outdated Local Git Branches

If your Git client does not clean-up the local branches after those branches got deleted in your remote repository, you can run this command to get rid of them:

This remote prune command deletes everything under the origin path if it no longer exists on the remote server. That makes it a helpful command …

Read more