Skip to content

Instantly share code, notes, and snippets.

View bgauduch's full-sized avatar
☁️

Baptiste Gauduchon bgauduch

☁️
View GitHub Profile
@bgauduch
bgauduch / dagger.cue
Created September 1, 2022 15:41
dagger test with Terraform
package terraform
import (
"dagger.io/dagger"
"dagger.io/dagger/core"
"universe.dagger.io/alpha/terraform"
)
dagger.#Plan & {
client: {
@bgauduch
bgauduch / multiple-repository-and-identities-git-configuration.md
Last active August 24, 2026 07:11
Multiple git identities on one machine: config per folder and per provider (personal vs work). Every command verified.

Multiple git identities on one machine

TL;DR

One machine, several git identities: typically personal vs work, GitHub vs GitLab, or two accounts on the same provider. This setup makes every repository pick the right name, email, and keys on its own, so no work commit ever goes out under your personal address (or the reverse). In a hurry: run the Appendix B script once per identity.

git config --global alias.lg1 'log --graph --abbrev-commit --decorate --format=format:"%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)" --all'
git config --global alias.lg2 'log --graph --abbrev-commit --decorate --format=format:"%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)" --all'