Created
June 7, 2020 14:09
-
-
Save nickname55/89c36b386f1437c2f5708d83f0cb368a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git filter-branch -f --env-filter ' | |
| CORRECT_EMAIL="[email protected]" | |
| CORRECT_NAME="ZZZZ5555" | |
| OLD_EMAIL="[email protected]" | |
| OLD_AUTHOR="hodfv" | |
| if test "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" | |
| then | |
| GIT_AUTHOR_EMAIL="$CORRECT_EMAIL" | |
| export GIT_AUTHOR_EMAIL | |
| fi | |
| if test "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" | |
| then | |
| GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" | |
| export GIT_COMMITTER_EMAIL | |
| fi | |
| if test "$GIT_COMMITTER_NAME" = "$OLD_AUTHOR" | |
| then | |
| GIT_COMMITTER_NAME="$CORRECT_NAME" | |
| export GIT_COMMITTER_NAME | |
| fi | |
| if test "$GIT_AUTHOR_NAME" = "$OLD_AUTHOR" | |
| then | |
| GIT_AUTHOR_NAME="$CORRECT_NAME" | |
| export GIT_AUTHOR_NAME | |
| fi | |
| ' --tag-name-filter cat -- --branches --tags | |
| userinput="" | |
| echo "Press ESC key to quit" | |
| # read a single character | |
| while read -r -n1 key | |
| do | |
| # if input == ESC key | |
| if [[ $key == $'\e' ]]; | |
| then | |
| break; | |
| fi | |
| # Add the key to the variable which is pressed by the user. | |
| userinput+=$key | |
| done | |
| printf "\nYou have typed : $userinput\n" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment