resulgit
v1.0.18
Published
A powerful CLI tool for version control system operations - clone, commit, push, pull, merge, branch management, and more
Maintainers
Readme
resulgit
A powerful command-line interface (CLI) tool for version control system operations.
Installation
npm install -g resulgitOr install locally:
npm install resulgitUsage
resulgit <command> [options]Commands
Authentication
resulgit auth set-token --token <token>- Set authentication tokenresulgit auth set-server --server <url>- Set server URLresulgit auth login --email <email> --password <password>- Login to serverresulgit auth register --username <name> --email <email> --password <password>- Register new account
Repository Management
resulgit repo list- List all repositoriesresulgit repo create --name <name> [--description <text>] [--visibility <private|public>]- Create new repositoryresulgit repo log --repo <id> [--branch <name>]- View commit logresulgit repo head --repo <id> [--branch <name>]- Get HEAD commitresulgit repo select- Interactive repository selection
Clone & Initialize
resulgit init <name>- Initialize a new repository (creates folder and remote repo automatically)resulgit init <name> --dir <path>- Initialize in a specific directoryresulgit clone <name>- Clone a repository by nameresulgit clone --repo <name> --branch <branch>- Clone with specific branchresulgit workspace set-root --path <dir>- Set workspace root directory
Branch Operations
resulgit branch list- List all branchesresulgit branch create <name>- Create new branch (simple)resulgit branch create <name> --base <branch>- Create from specific baseresulgit branch delete <name>- Delete a branchresulgit switch <branch>- Switch to a branchresulgit switch -c <branch>- Create and switch to new branchresulgit checkout <branch>- Checkout a branchresulgit merge <branch>- Merge a branch into current
File Operations
resulgit status- Show working directory statusresulgit diff [--path <file>] [--commit <id>]- Show differencesresulgit add <file> [--content <text>] [--all]- Add filesresulgit rm --path <file>- Remove filesresulgit mv --from <old> --to <new>- Move/rename filesresulgit restore --path <file> [--source <commit>]- Restore file from commit
Version Control
resulgit commit --message <text>- Create a commitresulgit commit -m <text>- Short form (same as above)resulgit commit -a -m <text>- Add all changes and commitresulgit push- Push changes to remoteresulgit pull- Pull changes from remoteresulgit merge --branch <name> [--squash] [--no-push]- Merge branchesresulgit cherry-pick --commit <id> [--branch <name>] [--no-push]- Cherry-pick a commitresulgit revert --commit <id> [--no-push]- Revert a commitresulgit reset [--commit <id>] [--mode <soft|mixed|hard>]- Reset to commit
Stash Operations
resulgit stashorresulgit stash save [--message <msg>]- Save changes to stashresulgit stash list- List all stashesresulgit stash pop [--index <n>]- Apply and remove stashresulgit stash apply [--index <n>]- Apply stash without removingresulgit stash drop [--index <n>]- Delete a stashresulgit stash clear- Clear all stashes
Tags
resulgit tag list- List all tagsresulgit tag create --name <tag> [--branch <name>]- Create a tagresulgit tag delete --name <tag>- Delete a tag
Pull Requests
resulgit pr list- List pull requestsresulgit pr create --title <title> [--source <branch>] [--target <branch>]- Create pull requestresulgit pr merge --id <id>- Merge a pull request
Information & Inspection
resulgit current- Show current repository and branchresulgit head- Show HEAD commit IDresulgit show --commit <id>- Show commit detailsresulgit log [--branch <name>] [--max <N>] [--oneline] [--stats]- Show commit history with visualizationresulgit blame --path <file>- Show line-by-line authorship informationresulgit grep --pattern <pattern> [--ignore-case]- Search for patterns in repositoryresulgit ls-files- List all tracked filesresulgit reflog- Show reference log historyresulgit cat-file --type <type> --object <id> [--path <file>]- Display file/commit contentsresulgit rev-parse --rev <ref>- Parse revision names to commit IDsresulgit describe [--commit <id>]- Describe a commit with nearest tagresulgit shortlog [--branch <name>] [--max <N>]- Summarize commit log by author
Git Hooks
resulgit hook list- List installed hooksresulgit hook install --name <hook> [--script <code>] [--sample]- Install a hookresulgit hook remove --name <hook>- Remove a hookresulgit hook show --name <hook>- Show hook content
Available hooks: pre-commit, post-commit, pre-push, post-push, pre-merge, post-merge, pre-checkout, post-checkout
Global Options
--server <url>- Override default server--token <token>- Override stored token--json- Output in JSON format--dir <path>- Specify working directory
Examples
# Login to server
resulgit auth login --email [email protected] --password mypassword
# List repositories
resulgit repo list
# Initialize a new repository (creates folder + remote repo automatically)
resulgit init MyProject
# Or clone an existing repository
resulgit clone MyProject
# Check status
cd MyProject
resulgit status
# Create and commit changes
resulgit add file.txt --content "Hello World"
resulgit commit -m "Add file.txt"
resulgit push
# Create a branch
resulgit branch create --name feature-branch
# Merge branches
resulgit merge --branch feature-branch
# View commit history with graph
resulgit log --max 20
# View commit history in one line
resulgit log --oneline
# View commit statistics
resulgit log --stats
# Show line-by-line authorship
resulgit blame --path src/index.js
# Search in repository
resulgit grep --pattern "TODO"
# List tracked files
resulgit ls-files
# Install a pre-commit hook
resulgit hook install --name pre-commit --sampleConfiguration
Configuration is stored in ~/.resulgit/config.json. You can set:
server: Default server URLtoken: Authentication tokenworkspaceRoot: Default workspace directory
License
MIT
