From a4e53166697f7d97770b6da20133a3f3b5af869e Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Tue, 5 May 2026 19:08:58 -0500 Subject: [PATCH 1/3] Prevent temporarily changed .gitignore file from being committed and pushed --- create-new-release.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/create-new-release.sh b/create-new-release.sh index c4d3ca7d7..f2c68d0c7 100755 --- a/create-new-release.sh +++ b/create-new-release.sh @@ -66,5 +66,7 @@ if [[ $(( $OLD_SHORT_VERSION % 3 )) -eq 0 ]] # directories can be committed and pushed. sed -i'.bak' -e "s/ga\/\*\/\*\/resources\/\*/#ga\/\*\/\*\/resources\/\*/g" .gitignore rm ./.gitignore.bak +git restore .gitignore +echo "**** Please be sure the new release's 'resources' subdirectories are commited and pushed because the vNext pipelines will fail without them. ****" echo "Done performing file updates."; From 30c888f476c2e18737c5508cd437f6454bb3e69a Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Wed, 6 May 2026 08:55:48 -0500 Subject: [PATCH 2/3] Prevent temporarily changed .gitignore file from being committed and pushed --- create-new-release.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/create-new-release.sh b/create-new-release.sh index f2c68d0c7..97e98f0a9 100755 --- a/create-new-release.sh +++ b/create-new-release.sh @@ -66,7 +66,8 @@ if [[ $(( $OLD_SHORT_VERSION % 3 )) -eq 0 ]] # directories can be committed and pushed. sed -i'.bak' -e "s/ga\/\*\/\*\/resources\/\*/#ga\/\*\/\*\/resources\/\*/g" .gitignore rm ./.gitignore.bak -git restore .gitignore -echo "**** Please be sure the new release's 'resources' subdirectories are commited and pushed because the vNext pipelines will fail without them. ****" echo "Done performing file updates."; +echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" +echo "!!!!!! Please do NOT commit and push the changed .gitignore file, which is only a temporary LOCAL change. !!!!!!" +echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" From 95d065c25ba20942d772fb7acaa3b96b3542f265 Mon Sep 17 00:00:00 2001 From: Wendy Raschke Date: Wed, 6 May 2026 16:23:40 -0500 Subject: [PATCH 3/3] Add prevention in pre-commit hook --- .pre-commit-config.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 005a85a18..34810deb9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,4 +18,11 @@ repos: # when "--baseline" without "--use-all-plugins", pre-commit scan with just plugins in baseline file # when "--baseline" with "--use-all-plugins", pre-commit scan with all available plugins # add "--fail-on-unaudited" to fail pre-commit for unaudited potential secrets - args: [--baseline, .secrets.baseline, --use-all-plugins] \ No newline at end of file + args: [--baseline, .secrets.baseline, --use-all-plugins] + - repo: local + hooks: + - id: no-gitignore-commit + name: Prevent .gitignore from getting committed + entry: ".gitignore file commit detected" + language: fail + files: ^.gitignore$