gitty-cli
v1.0.2
Published
Git command shortcuts with visual feedback
Maintainers
Readme
Gitty
Git command shortcuts with visual feedback for the command line.
Features
- 🚀 Simple Shortcuts: Use gt p instead of git push
- 🌈 Visual Feedback: Colorized output for easy reading
- 🔒 Safety Checks: Confirmations for potentially destructive operations
- 🧠 Smart Defaults: Common patterns simplified to single commands
Installation
npm install -g gitty-cliUsage
Basic Commands
gt a # git add .
gt c "fix bug" # git commit -m "fix bug"
gt p # git push
gt s # git statusCommand Reference
📦 Basic Commands
| Command | Git Equivalent | Description |
|---------------------|----------------------------|------------------------|
| gt a | git add . | Add all changes |
| gt aa [file] | git add [file] | Add specific file |
| gt c "message" | git commit -m "message" | Commit with message |
| gt ca "message" | git commit -am "message" | Add all and commit |
| gt s | git status | Check status |
🌿 Branch Commands
| Command | Git Equivalent | Description |
|---------------------|-------------------------------|----------------------------------|
| gt b | git branch | List branches |
| gt co [branch] | git checkout [branch] | Switch branch |
| gt cb [branch] | git checkout -b [branch] | Create and switch to new branch |
| gt bd [branch] | git branch -d [branch] | Delete a branch |
| gt bD [branch] | git branch -D [branch] | Force delete branch |
🌍 Remote Commands
| Command | Git Equivalent | Description |
|------------------------------|----------------------------------------|----------------------------------|
| gt p | git push | Push to current branch |
| gt po [branch] | git push origin [branch] | Push to specific branch |
| gt pom | git push origin main | Push to origin main |
| gt pl | git pull | Pull from current branch |
| gt plom | git pull origin main | Pull from origin main |
| gt ra [name] [url] | git remote add [name] [url] | Add a remote |
| gt rao [url] | git remote add origin [url] | Add origin remote |
⚙️ Config Commands
| Command | Git Equivalent | Description |
|----------------|----------------------------------|--------------------------------------|
| gt cfpl | git config pull.rebase false | Configure pull to use merge |
| gt cfpr | git config pull.rebase true | Configure pull to use rebase |
| gt cfpf | git config pull.ff only | Configure pull to fast-forward only |
♻️ Reset Commands
| Command | Git Equivalent | Description |
|---------------------|----------------------------------|--------------------------------------|
| gt rs [file] | git reset [file] | Unstage files |
| gt rsh [commit] | git reset --hard [commit] | Hard reset to commit |
| gt rss | git reset --soft HEAD~1 | Undo last commit (keep changes) |
| gt rsh | git reset --hard | Discard all local changes |
🔍 Log & Diff Commands
| Command | Git Equivalent | Description |
|------------------|------------------------------------------|-------------------------------|
| gt l | git log --oneline -n 10 | View recent commits |
| gt lg | git log --graph --oneline --all | View all commits as a graph |
| gt d | git diff | View unstaged changes |
| gt dc | git diff --cached | View staged changes |
| gt df [file] | git diff [file] | View changes in specific file |
🧪 Stash Commands
| Command | Git Equivalent | Description |
|-----------|--------------------|---------------------------|
| gt sh | git stash | Stash current changes |
| gt sl | git stash list | List all stashes |
| gt sp | git stash pop | Apply latest stash |
| gt sa | git stash apply | Apply without removing |
| gt sd | git stash drop | Drop latest stash |
🚨 Rebase & Merge Commands
| Command | Git Equivalent | Description |
|--------------|----------------------------|------------------------------------|
| gt m [br] | git merge [branch] | Merge branch into current |
| gt r [br] | git rebase [branch] | Rebase current onto branch |
| gt rab | git rebase --abort | Abort rebase |
| gt rc | git rebase --continue | Continue after conflict resolution |
🗑️ Delete & Clean Commands
| Command | Git Equivalent | Description |
|----------------|---------------------------|-------------------------------------|
| gt cl | git clean -fd | Remove untracked files and folders |
Safety Features
For potentially dangerous operations like force push or undoing commits, Gitty will ask for confirmation:
$ gt pf
Executing: git push --force-with-lease
? This will force push to remote. Continue? (y/N)Examples
Quick Commit and Push
# Add all files, commit and push in two commands
gt ca "implement login feature"
gt pBranch Management
# Create a new feature branch
gt cb feature/user-profile
# Check status
gt s
# Switch back to main
gt co mainUndo Last Commit
# Oops, need to undo that last commit
gt uContributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch:
gt co -b feature/my-new-feature - Commit your changes:
gt ca -am 'Add some feature' - Push to the branch:
gt p origin feature/my-new-feature - Submit a pull request
License
MIT
