|
|
|
@ -2848,6 +2848,24 @@ git config --global --unset http.proxy # remove proxy config
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### 批量修改远程仓库邮箱地址和用户名
|
|
|
|
|
```shell
|
|
|
|
|
git filter-branch -f --env-filter '
|
|
|
|
|
OLD_EMAIL="原来的邮箱"
|
|
|
|
|
CORRECT_NAME="现在的名字"
|
|
|
|
|
CORRECT_EMAIL="现在的邮箱"
|
|
|
|
|
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
|
|
|
|
|
then
|
|
|
|
|
export GIT_COMMITTER_NAME="$CORRECT_NAME"
|
|
|
|
|
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
|
|
|
|
|
fi
|
|
|
|
|
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
|
|
|
|
|
then
|
|
|
|
|
export GIT_AUTHOR_NAME="$CORRECT_NAME"
|
|
|
|
|
export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
|
|
|
|
|
fi
|
|
|
|
|
' --tag-name-filter cat -- --branches --tags
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### 增加/删除文件
|
|
|
|
|
|
|
|
|
|