#!/bin/sh # SPDX-License-Identifier: MIT set -eu export TZ=UTC LC_ALL=C export GIT_CONFIG_NOSYSTEM=1 GIT_CONFIG_GLOBAL=/dev/null export GIT_AUTHOR_NAME='Example Author' GIT_AUTHOR_EMAIL='author@example.invalid' export GIT_COMMITTER_NAME='Example Author' GIT_COMMITTER_EMAIL='author@example.invalid' export GIT_AUTHOR_DATE='2026-10-27T12:00:00+00:00' export GIT_COMMITTER_DATE='2026-10-27T12:00:00+00:00' test "$(git --version)" = 'git version 2.56.0' mkdir example-work cd example-work git init --bare -q --template= --initial-branch=main remote.git git init -q --template= --initial-branch=main project cd project git config commit.gpgsign false git config core.autocrlf false git remote add origin ../remote.git printf 'example settings\n' > settings.local git add settings.local git commit -qm 'Track example settings' git push -q -u origin main cd .. git clone -q --template= --branch main remote.git peer cd project printf 'settings.local\n' > .gitignore git add .gitignore git rm --cached -- settings.local test -f settings.local git commit -qm 'Stop tracking settings' git push -q origin main git -C ../peer pull -q --ff-only test ! -e ../peer/settings.local test -f settings.local printf 'Original working file remains; peer file removed on pull\n'