Skip to content

Commit

Permalink
feat: add fixemoji util
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgrv committed Sep 16, 2024
1 parent f2027b6 commit b4f460d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/gitutils/_fixemoji.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

#### Goto repository root
cd "$(git rev-parse --show-toplevel)" >/dev/null

#### Rewrite history to fix author
# Rewrite commit messages to add the appropriate emoji
git filter-branch --msg-filter 'npx --yes devmoji -t "$(cat)"' -- --all

# Clean up the original refs
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
2 changes: 1 addition & 1 deletion src/gitutils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Git Aliases",
"id": "gitutils",
"version": "1.6.3",
"version": "1.7.0",
"description": "A feature to add useful Git aliases to your shell.",
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils",
Expand Down

0 comments on commit b4f460d

Please sign in to comment.