From 71280e098321902f3951990fd2ffca94c9b33297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20P=C4=99dzim=C4=85=C5=BC?= Date: Wed, 6 May 2026 12:54:48 +0200 Subject: [PATCH] fix(git): move private settings out of tracked .gitconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove [user], [credential *], and [url *] sections from git/.gitconfig — these are machine-specific and were exposed in the public repo. They belong in ~/.gitconfig.local, which is already included at the end of .gitconfig and is never committed. Add git/.gitconfig.local.example as a template. Move generic preferences ([pull], [rebase], [fetch], [diff] tool) above the [include] line so local settings can override them. --- CHANGELOG.md | 14 ++++++++++++++ CLAUDE.md | 1 + VERSION | 2 +- git/.gitconfig | 21 +++------------------ git/.gitconfig.local.example | 29 +++++++++++++++++++++++++++++ 5 files changed, 48 insertions(+), 19 deletions(-) create mode 100644 git/.gitconfig.local.example diff --git a/CHANGELOG.md b/CHANGELOG.md index 7844d90..257275d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.6.2] - 2026-05-06 + +### Fixed +- `git/.gitconfig`: removed private `[user]`, `[credential *]`, and `[url *]` + sections that were committed to the public repo. These belong in + `~/.gitconfig.local`, which is already included at the end of `.gitconfig` + and is never tracked by git. Also moved `[pull]`, `[rebase]`, `[fetch]`, + and `[diff]` tool settings above the `[include]` line so local settings can + override them. + +### Added +- `git/.gitconfig.local.example`: template showing the structure for + `~/.gitconfig.local` (user identity, credential helpers, URL rewrites). + ## [1.6.1] - 2026-05-06 ### Fixed diff --git a/CLAUDE.md b/CLAUDE.md index e8265d8..b800ed1 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -269,6 +269,7 @@ already at the highest dotfiles-managed PATH priority. | `nvim/.config/nvim` | `~/.config/nvim` (directory symlink) | | `git/.gitconfig` | `~/.gitconfig` | | `git/.gitattributes` | `~/.gitattributes` | +| `git/.gitconfig.local.example` | reference only — copy to `~/.gitconfig.local` and fill in name/email/credentials (never committed; included at end of `.gitconfig` so it can override anything) | | `ripgrep/rc` | `~/.config/ripgrep/rc` | | `ranger/rc.conf`, `rifle.conf`, `scope.sh`, `commands*.py` | `~/.config/ranger/` (individual files) | | `x11/.xprofile` | `~/.xprofile` | diff --git a/VERSION b/VERSION index 9c6d629..fdd3be6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.6.1 +1.6.2 diff --git a/git/.gitconfig b/git/.gitconfig index 6bf24a1..9d18e43 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -50,11 +50,6 @@ [merge] conflictstyle = zdiff3 -[include] - path = ~/.gitconfig.local -[user] - name = Wojciech Pędzimąż - email = wojciech.pedzimaz@techmo.pl [pull] rebase = true [rebase] @@ -63,16 +58,6 @@ prune = true [diff] tool = vimdiff -[credential "https://gitlab.gnome.org"] - helper = - helper = !/usr/bin/glab auth git-credential -[credential "https://github.com"] - helper = - helper = !/usr/bin/gh auth git-credential -[credential "https://gist.github.com"] - helper = - helper = !/usr/bin/gh auth git-credential -[url "https://gitlab.devtechmo.pl/"] - insteadOf = git@gitlab.devtechmo.pl: -[credential "https://gitlab.devtechmo.pl"] - helper = !/usr/bin/glab auth git-credential + +[include] + path = ~/.gitconfig.local diff --git a/git/.gitconfig.local.example b/git/.gitconfig.local.example new file mode 100644 index 0000000..98f7c07 --- /dev/null +++ b/git/.gitconfig.local.example @@ -0,0 +1,29 @@ +# ~/.gitconfig.local — machine-specific git settings (never committed) +# +# Copy this file to ~/.gitconfig.local and fill in your values. +# It is included at the end of git/.gitconfig so it can override anything. +# +# Minimum required: +# +# [user] +# name = Your Name +# email = you@example.com +# +# Credential helpers (add only what you have installed): +# +# [credential "https://github.com"] +# helper = +# helper = !/path/to/gh auth git-credential +# +# [credential "https://gist.github.com"] +# helper = +# helper = !/path/to/gh auth git-credential +# +# [credential "https://gitlab.example.com"] +# helper = +# helper = !/path/to/glab auth git-credential +# +# URL rewrites (e.g. to force HTTPS for a specific host): +# +# [url "https://gitlab.example.com/"] +# insteadOf = git@gitlab.example.com: