forked from eclipse-tractusx/managed-identity-wallet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathalter_githistory.sh
32 lines (30 loc) · 904 Bytes
/
alter_githistory.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
git filter-branch --env-filter '
OLD_EMAIL="m.schmidt.extern@cluetec.de"
NEW_NAME="Maximilian Schmidt"
NEW_EMAIL="maximilian.schmidt.external@zf.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags
git filter-branch --env-filter '
OLD_EMAIL="info@pmoscode.de"
NEW_NAME="m.schmidt.extern@cluetec.de"
NEW_EMAIL="peter.motzko@volkswagen.de"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_AUTHOR_NAME="$NEW_NAME"
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
fi
' --tag-name-filter cat -- --branches --tags