mirror of
https://mau.dev/andreijiroh-dev/dotfiles.git
synced 2025-07-01 08:36:00 +00:00
feat(scripts): import more scripts from legacy codebase
Plus, in this commit: * updated most of shell rc and then some Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
This commit is contained in:
parent
22503403bb
commit
81aca31cdf
10 changed files with 214 additions and 10 deletions
25
bin/fix-wrong-emails
Executable file
25
bin/fix-wrong-emails
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ $1 != "" ]]; then
|
||||
git filter-branch --env-filter '
|
||||
WRONG_EMAIL=$1
|
||||
NEW_NAME="Andrei Jiroh Eugenio Halili"
|
||||
NEW_EMAIL="andreijiroh@madebythepins.tk"
|
||||
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
|
||||
then
|
||||
export GIT_COMMITTER_NAME="$NEW_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$WRONG_EMAIL" ]
|
||||
then
|
||||
export GIT_AUTHOR_NAME="$NEW_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
|
||||
fi
|
||||
' --tag-name-filter cat -- --branches --tags
|
||||
else
|
||||
echo "Usage $0 <wrong-email@host.me>"
|
||||
echo "Easily fix wrong emails in Git commit history. It is advised to use this script only"
|
||||
echo "on non-public commits, since this might be distaterous for forks to pull any changes"
|
||||
echo "in the public commits."
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue