update DevOps.md.

pull/4/head
柠檬夕桐 2 years ago committed by Gitee
parent 2531b101f7
commit 3432fd2138
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -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
```
### 增加/删除文件

Loading…
Cancel
Save