Make your git history beautiful with emojis and smart commits
Before: π΄
a1b2c3d Update stuff
e4f5g6h Fix thing
i7j8k9l Add feature
After: β¨
a1b2c3d β¨ feat(auth): add user authentication
e4f5g6h π fix(login): resolve validation error on mobile
i7j8k9l π docs: update API documentation
# Clone to your home directory (recommended)
git clone https://github.com/nirholas/gitpretty.git ~/.gitpretty
# Or clone anywhere you like
git clone https://github.com/nirholas/gitpretty.git /path/to/gitprettyStage your changes and commit with a simple description:
# Stage all files and commit
git add -A && ~/.gitpretty/scripts/emoji-commit.sh "add user dashboard"
# Result: β¨ Add user dashboard
# Stage specific files and commit
git add src/auth.ts && ~/.gitpretty/scripts/emoji-commit.sh "fix login bug"
# Result: π Fix login bugThe script automatically detects the commit type from your message:
| Your message | Becomes |
|---|---|
"add new feature" |
β¨ Add new feature |
"fix login error" |
π Fix login error |
"update readme" |
π Update readme |
"refactor auth module" |
β»οΈ Refactor auth module |
"remove old code" |
ποΈ Remove old code |
For more descriptive, conventional commit messages:
# Basic: type + description
git add -A && ~/.gitpretty/scripts/smart-commit.sh feat "add user authentication"
# Result: β¨ feat: add user authentication
# With scope: type + scope + description
git add -A && ~/.gitpretty/scripts/smart-commit.sh feat auth "add OAuth2 login"
# Result: β¨ feat(auth): add OAuth2 login
# Preview without committing (dry-run)
~/.gitpretty/scripts/smart-commit.sh -d feat "add new feature"Commit types:
| Type | Emoji | Use for |
|---|---|---|
feat |
β¨ | New features |
fix |
π | Bug fixes |
docs |
π | Documentation |
style |
π | Formatting, CSS |
refactor |
β»οΈ | Code restructuring |
perf |
β‘ | Performance improvements |
test |
β | Adding tests |
chore |
π§ | Maintenance tasks |
ci |
π· | CI/CD changes |
build |
ποΈ | Build system |
security |
π | Security fixes |
deploy |
π | Deployments |
| Script | What it does | Example |
|---|---|---|
emoji-commit.sh |
Quick commit with auto-emoji | git add -A && ~/.gitpretty/scripts/emoji-commit.sh "add feature" |
smart-commit.sh |
Conventional commits with scope | git add -A && ~/.gitpretty/scripts/smart-commit.sh feat auth "add login" |
commit-lint.sh |
Validate commit message format | ~/.gitpretty/scripts/commit-lint.sh |
| Script | What it does | Example |
|---|---|---|
emoji-branch.sh |
Create pretty branch names | ~/.gitpretty/scripts/emoji-branch.sh feature login-page |
emoji-merge.sh |
Merge with emoji message | ~/.gitpretty/scripts/emoji-merge.sh feature/auth |
emoji-tag.sh |
Create tagged releases | ~/.gitpretty/scripts/emoji-tag.sh v1.0.0 major |
| Script | What it does | Example |
|---|---|---|
emoji-log.sh |
Pretty git log views | ~/.gitpretty/scripts/emoji-log.sh graph |
emoji-log.sh |
Today's commits | ~/.gitpretty/scripts/emoji-log.sh today |
emoji-log.sh |
This week's commits | ~/.gitpretty/scripts/emoji-log.sh week |
| Script | What it does | Example |
|---|---|---|
emoji-stash.sh |
Save work in progress | ~/.gitpretty/scripts/emoji-stash.sh save wip "testing auth" |
emoji-stash.sh |
List stashes | ~/.gitpretty/scripts/emoji-stash.sh list |
| Script | What it does | Example |
|---|---|---|
file-tree.sh |
Show repo structure | ~/.gitpretty/scripts/file-tree.sh |
repo-stats.sh |
Repository statistics | ~/.gitpretty/scripts/repo-stats.sh |
changelog-gen.sh |
Generate changelog | ~/.gitpretty/scripts/changelog-gen.sh |
git-beautify.sh |
Beautify existing history | ~/.gitpretty/scripts/git-beautify.sh |
| Script | What it does | Example |
|---|---|---|
emoji-hooks.sh |
Install auto-emoji git hooks | ~/.gitpretty/scripts/emoji-hooks.sh install |
Install once, and every commit automatically gets emojis:
# Install hooks in your repo
cd /path/to/your-repo
~/.gitpretty/scripts/emoji-hooks.sh install
# Now every commit gets auto-emoji!
git commit -m "add feature"
# πͺ Auto-added: β¨
# β¨ Add featureAdd to your ~/.gitconfig for shorter commands:
[alias]
# Quick emoji commit
c = "!f() { git add -A && ~/.gitpretty/scripts/emoji-commit.sh \"$1\"; }; f"
# Smart commit with type
sc = "!f() { git add -A && ~/.gitpretty/scripts/smart-commit.sh \"$@\"; }; f"
# Pretty log
lg = "!~/.gitpretty/scripts/emoji-log.sh"
# Pretty stash
st = "!~/.gitpretty/scripts/emoji-stash.sh"Then use:
git c "add new feature" # Quick commit
git sc feat auth "add OAuth" # Smart commit with scope
git lg graph # Pretty log graph
git st list # Pretty stash listMIT
git pretty β¨ make your commits beautiful