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 / 0 - Multiple git identities on one machine.md
Last active September 9, 2026 16:19
Multiple git identities on one machine: config per folder and per provider (personal vs work). Every command verified.

Multiple git identities on one machine

One machine, several git identities (personal vs work, GitHub vs GitLab, two accounts on one provider). Each repository picks its own name, email and credentials. In a hurry: Appendix B, once per rule.

A wrong identity does not fail: git commits and pushes under the wrong author. Part 1 ends with the check that catches it.

Requirements

Feature Minimum git
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'