Skip to content

Commit 3620257

Browse files
committed
fix: scope git config to local repo, allow env var overrides
- Drop --global from `git config pull.rebase false` to avoid mutating the user's global git configuration. - Use ${VAR:-default} for TEMPLATE_URL and BRANCH so they can be overridden via environment variables without editing the script.
1 parent 3dafbd9 commit 3620257

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/update_from_template.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#! /bin/bash
22
set -eo pipefail
33

4-
TEMPLATE_URL="https://github.com/blooop/python_template.git"
5-
BRANCH="feature/update_from_template"
4+
TEMPLATE_URL="${TEMPLATE_URL:-https://github.com/blooop/python_template.git}"
5+
BRANCH="${BRANCH:-feature/update_from_template}"
66

7-
git config --global pull.rebase false
7+
git config pull.rebase false
88
git remote remove template 2>/dev/null || true
99
git remote add template "$TEMPLATE_URL"
1010
git fetch --all

0 commit comments

Comments
 (0)