Skip to content

Instantly share code, notes, and snippets.

View sudoforge's full-sized avatar

sudoforge

View GitHub Profile
@sudoforge
sudoforge / README.md
Last active June 27, 2023 15:18
Managing multiple Git identities

Managing multiple Git identities

This gist exists to display how I manage my Git configuration for different identities (e.g. personal and work identities) using the default configuration chain in Git.

My global git configuration is stored [in my dotiles repository][dotfiles], which is public, but includes no work-related git configuration. Instead, that lives in and is managed by other files on my system, which are not synced to that public dotfiles repository. With just a few small configuration changes, you can learn how to do this too.

@sudoforge
sudoforge / git_speed.md
Last active April 20, 2020 21:02 — forked from emanuelez/git_speed.md
Git Speed

How Fast if Git?

The web is full of benchmarks showing the supernatural speed of Git even with very big repositories, but unfortunately they use the wrong variable. Size is not important, but the number of files in the repository really is!

Why is that? Well, that's because Git works in a very different way compared to Synergy. You don't have to checkout a file in order to edit it; Git will do that for you automatically. But at what price?

The price is that for every Git operation that requires to know which files changed (git status, git commmit, etc etc) an lstat() call will be executed for every single file

Wow! So how does that perform on a fairly large repository? Let's find out! For this example I will use an example project, which has 19384 files in 1326 folders.