Package Exports
- gitcut
- gitcut/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gitcut) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
🚀 Gitcut
Gitcut is a streamlined CLI tool that simplifies common Git operations with intuitive commands, making your Git workflow faster and more efficient.
✨ Features
- 📥 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
🛠️ Installation
npm install -g gitcut⚙️ Configuration
Initialize the configuration:
gt --initThis 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.
📚 Commands
query
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/deprecatedRunning without arguments launches interactive mode.
You can also use presets defined in your gtconfig.json:
gt query mainsubmit
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.
bh (branch handling)
Create and push a new branch:
gt bh feature/new-featureList remote branches:
gt bh -lCreate branch with interactive prompt:
gt bhCreate branch with emoji:
gt bh -ecp (cherry pick)
Interactive cherry-picking:
gt cpmg (merge)
Interactive branch merging:
gt mgrc (rebase continue)
Simplifies the rebase continue process:
gt rcstats
View contribution statistics:
gt stats [time-range]Default time range is 1 week. Examples:
gt stats 2.weeks
gt stats 1.month📄 License
MIT