From 4c2dd3d6aa701a9f1707fa07fc11e40af58fbd0a Mon Sep 17 00:00:00 2001 From: Desmon Date: Mon, 29 May 2023 09:48:07 +0200 Subject: [PATCH] confirmacion --- .gitignore | 2 +- code.bat | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 452cca7..7dec5f0 100644 --- a/.gitignore +++ b/.gitignore @@ -51,4 +51,4 @@ Module.symvers Mkfile.old dkms.conf code.sh -code.bat \ No newline at end of file +code.bat diff --git a/code.bat b/code.bat index 8d265b9..3def938 100644 --- a/code.bat +++ b/code.bat @@ -3,7 +3,8 @@ git add . git config advice.addIgnoredFile false git add -f .gitignore -echo code.sh >> .gitignore +echo . >> .gitignore +echo code.bat >> .gitignore git add -f code.sh git rm --cached "./code.sh" @@ -17,9 +18,26 @@ git config --global user.name "%NEW_NAME%" git config --global user.email "%NEW_EMAIL%" git commit -m "confirmacion" -git filter-branch --index-filter "git rm --cached --ignore-unmatch code.sh" HEAD - -git filter-repo --mailmap "%OLD_EMAIL% = %NEW_NAME% <%NEW_EMAIL%> %OLD_EMAIL% = %NEW_NAME% <%NEW_EMAIL%>" --force +git filter-repo --path code.sh --invert-paths +rem git filter-branch --index-filter "git rm --cached --ignore-unmatch code.sh" HEAD + +git filter-branch -f --env-filter " + if ""%GIT_AUTHOR_EMAIL%"" == ""%OLD_EMAIL%"" ( + set FOUND_AUTHOR_EMAIL=1 + ) + if ""%GIT_COMMITTER_EMAIL%"" == ""%OLD_EMAIL%"" ( + set FOUND_COMMITTER_EMAIL=1 + ) + + if defined FOUND_AUTHOR_EMAIL ( + set GIT_AUTHOR_EMAIL=%NEW_EMAIL% + set GIT_AUTHOR_NAME=%NEW_NAME% + ) + if defined FOUND_COMMITTER_EMAIL ( + set GIT_COMMITTER_EMAIL=%NEW_EMAIL% + set GIT_COMMITTER_NAME=%NEW_NAME% + ) +" -- --all echo subiendo cambios git config --global credential.helper cache