-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--email-callback doesn't work (CMD on Windows doesn't treat single quote, ['], as a quote mark) #435
Comments
This looks like a quoting problem. Can you confirm what shell you're using (Bash, PowerShell, cmd, …) and provide a complete copy-paste of the command and output as you see it? |
In CMD python.exe git-filter-repo ... "return ..." In Windows the nested quote character as the entire command line depends on the application contained in the command line being executed (child process), when in Linux - on the application has executed the command line (parent process). Try something like:
python.exe git-filter-repo ... "return ... \" ... \"" Basically in Windows all |
i already tried the triple quotes and got this for the backslash method i get the error still |
Can you introduce the full command line you typed in console? |
yeah, here it is
(previously i had |
You didn't fix the command line, you still trying to use |
ohhhh. around the whole command, i just noticed. also i tested this on a small dummy local repo and forced it and it works. if i try this on a repo that is on gitlab. i noticed an incorrect email address on sonarQube, which is why im trying to change my email now |
I don't know how would git-filter-repo act, but the old filter-branch just creates |
When you run filter-repo, it modifies any commits matching the rules you specify, AND all commits which come after those in any branch. If you were just fixing up the latest commit on some branch, force-pushing back to the resource might be okay. But pushing a rewritten version of public history should not be something you undertake lightly; please read https://www.mankier.com/1/git-filter-repo#Discussion to get some background on the ramifications. You may also want to see https://docs.gitlab.com/ee/user/project/repository/reducing_the_repo_size_using_git.html#repository-cleanup for the steps to take if you need to purge the old commits.
Glad it's working for you now. Thanks, both @me-and and @andry81. |
using the following syntax
git-filter-repo --email-callback 'return email.replace(b".cm", b".com")'
i try out
git-filter-repo --email-callback 'return email.replace(b"user@email.com", b"user.name@email.com")'
but i get the following error
git-filter-repo: error: unrecognized arguments: email.replace(buser@email.com, buser.name@email.com)'
so i try this
git-filter-repo --email-callback 'return email.replace(b"""user@email.com""", b"""user.name@email.com""")'
but i get this
git-filter-repo: error: unrecognized arguments: email.replace(b"user@email.com", b"user.name@email.com")'
what am i doing wrong?
The text was updated successfully, but these errors were encountered: