Skip to content

Commit

Permalink
GitBook: [master] 3 pages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
ufonion authored and gitbook-bot committed Aug 25, 2020
1 parent f555358 commit f6644c9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
5 changes: 5 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@
* [Docker](virtualization-containerization/docker/README.md)
* [Protect the Docker daemon socket](virtualization-containerization/docker/protect-the-docker-daemon-socket.md)

## Development

* [Git](development/git/README.md)
* [Tricks](development/git/tricks.md)

2 changes: 2 additions & 0 deletions development/git/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Git

24 changes: 24 additions & 0 deletions development/git/tricks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Tricks

## Change author information of previous commits

```bash
git filter-branch --env-filter '
WRONG_EMAIL="wrong_user@wrong_email_server.com"
NEW_NAME="ufonion"
NEW_EMAIL="[email protected]"
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
git push --force
```

0 comments on commit f6644c9

Please sign in to comment.