Gitcut is a streamlined CLI tool that simplifies common Git operations with intuitive commands, making your Git workflow faster and more efficient.
- 📥 Query - Cherry-pick files from specific branches and repositories
- 📤 Submit - Quickly commit and push changes with enhanced commit messages
- 🔀 Branch Handling - Create and manage branches with ease
- 🍒 Cherry Pick - Interactive cherry-picking from remote branches
- 🔄 Merge - Interactive branch merging
- 📊 Stats - View contribution statistics by author
npm install -g gitcut
Initialize the configuration:
gt --init
This creates a gtconfig.json
file in your current directory with default settings:
{
"query": {
"main": {
"remoteUrl": "",
"branch": "",
"paths": ["src"]
}
},
"submit": {
"emoji": false
}
}
You can customize this file to add your own presets and preferences.
Pull specific files from a remote branch:
gt query <remote> <branch> <paths...>
You can exclude specific paths by prefixing them with !
:
gt query origin main src/components !src/components/deprecated
Running without arguments launches interactive mode.
You can also use presets defined in your gtconfig.json
:
gt query main
Commit and push changes in one step:
gt submit "feat: add new feature"
Emoji support for commit types can be enabled in the configuration file (gtconfig.json
) by setting submit.emoji
to true
.
When enabled, these emoji prefixes are supported:
- feat: ✨
- fix: 🐛
- docs: 📝
- style: 🎨
- refactor: 🔨
- perf: ⚡️
- test: ✅
- chore: 🔧
- ci: 💚
- revert: ⏪
- build: 📦
And you can use gt s
as a shorthand for gt submit
.
Create and push a new branch:
gt bh feature/new-feature
List remote branches:
gt bh -l
Create branch with interactive prompt:
gt bh
Create branch with emoji:
gt bh -e
Interactive cherry-picking:
gt cp
Interactive branch merging:
gt mg
Simplifies the rebase continue process:
gt rc
View contribution statistics:
gt stats [time-range]
Default time range is 1 week. Examples:
gt stats 2.weeks
gt stats 1.month
MIT