@chidiahua/ch-git
v0.0.7
Published
A lightning-fast Git CLI wrapper that simplifies your workflow with intuitive commands. Write 'ch commit message' instead of 'git commit -m message'. Features quick workflows like 'ch acp' for add-commit-push in one command. Built with TypeScript for type
Maintainers
Readme
CH - Simplified Git CLI
A simplified Git CLI wrapper for faster workflows. Say goodbye to typing git commit -m "message" and hello to ch commit message! Features quick workflows like ch acp for add-commit-push in one command.
Created by Chidi Ahua
Installation
Using NPM
npm install -g @chidiahua/ch-gitUsing Yarn
yarn global add @chidiahua/ch-gitmacOS - Install globally without sudo
If you encounter permission errors when installing globally, you can set a local npm path:
# Create a directory for global npm packages
mkdir -p ~/.npm-global
# Configure npm to use it
npm config set prefix '~/.npm-global'
# Add it to your PATH (for zsh)
echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc
# For bash, use:
echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.bash_profile
source ~/.bash_profile
### Basic Commands
```bash
ch init # Initialize a new repository
ch add # Stage files (default: all)
ch commit ft-home # Commit changes (no -m flag needed!)
ch push # Push to remote
ch pull # Pull from remote
ch status # Check repository statusQuick Workflows
ch acp "fix-bug" # Add, commit, and push in one command
ch branch -c ch/new-ch # Create new branch and switch to it
ch undo # Undo last commit (keep changes)Branch Management
ch branch # List all branches
ch branch main # Switch to branch
ch branch -c ch/awesome # Create and switch to new branch
ch branch -i # Interactive branch management
ch del ch/old # Delete a branch
ch del -f ch/old # Force delete a branchStash Operations
ch stash # Stash changes
ch stash pop # Apply stashed changes
ch stash list # List stashes
ch stash clear # Clear all stashes
ch stash -i # Interactive stash menuOther Commands
ch log # Show commit history
ch diff # Show diff of files
ch merge ch/branch # Merge branch into current
ch reset # Hard reset current branch to remote
ch clone https://github.com/ch/ch.git # Clone a repositoryWhy CH?
- Faster: Less typing, more coding
- Simpler: Intuitive commands without extra flags
- Colored Output: Beautiful terminal logs
- Smart: Sensible defaults for common operations
Example
Instead of:
git add .
git commit -m "ft-home"
git push origin mainJust type:
ch acp ft-homeLicense
MIT
