resulgit
v1.0.22
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 & Workspace
resulgit clone --repo <id> --branch <name> [--dest <dir>]- Clone a repositoryresulgit workspace set-root --path <dir>- Set workspace root directory
Branch Operations
resulgit branch list- List all branchesresulgit branch create --name <branch> [--base <branch>]- Create new branchresulgit branch delete --name <branch>- Delete a branchresulgit switch --branch <name>- Switch to a branchresulgit checkout --branch <name>- Checkout a branch
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 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
resulgit current- Show current repository and branchresulgit head- Show HEAD commit IDresulgit show --commit <id>- Show commit details
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
# Clone a repository
resulgit clone --repo 123 --branch main
# Check status
resulgit status
# Create and commit changes
resulgit add file.txt --content "Hello World"
resulgit commit --message "Add file.txt"
resulgit push
# Create a branch
resulgit branch create --name feature-branch
# Merge branches
resulgit merge --branch feature-branchConfiguration
Configuration is stored in ~/.resulgit/config.json. You can set:
server: Default server URLtoken: Authentication tokenworkspaceRoot: Default workspace directory
License
MIT
