A powerful CLI tool for version control system operations - clone, commit, push, pull, merge, branch management, and more
npm install resulgitA powerful command-line interface (CLI) tool for version control system operations.
``bash`
npm install -g resulgit
Or install locally:
`bash`
npm install resulgit
`bash`
resulgit
- resulgit auth set-token --token - Set authentication tokenresulgit auth set-server --server
- - Set server URLresulgit auth login --email
- - Login to serverresulgit auth register --username
- - Register new account
- resulgit repo list - List all repositoriesresulgit repo create --name
- - Create new repositoryresulgit repo log --repo
- - View commit logresulgit repo head --repo
- - Get HEAD commitresulgit repo select
- - Interactive repository selection
- resulgit init - Initialize a new repository (creates folder and remote repo automatically)resulgit init
- - Initialize in a specific directoryresulgit clone
- - Clone a repository by nameresulgit clone --repo
- - Clone with specific branchresulgit workspace set-root --path
- - Set workspace root directory
- resulgit branch list - List all branchesresulgit branch create
- - Create new branch (simple)resulgit branch create
- - Create from specific baseresulgit branch delete
- - Delete a branchresulgit switch
- - Switch to a branchresulgit switch -c
- - Create and switch to new branchresulgit checkout
- - Checkout a branchresulgit merge
- - Merge a branch into current
- resulgit status - Show working directory statusresulgit diff [--path
- - Show differencesresulgit add
- - Add filesresulgit rm --path
- - Remove filesresulgit mv --from
- - Move/rename filesresulgit restore --path
- - Restore file from commit
- resulgit commit --message - Create a commitresulgit commit -m
- - Short form (same as above)resulgit commit -a -m
- - Add all changes and commitresulgit push
- - Push changes to remoteresulgit pull
- - Pull changes from remoteresulgit merge --branch
- - Merge branchesresulgit cherry-pick --commit
- - Cherry-pick a commitresulgit revert --commit
- - Revert a commitresulgit reset [--commit
- - Reset to commit
- resulgit stash or resulgit stash save [--message - Save changes to stashresulgit stash list
- - List all stashesresulgit stash pop [--index
- - Apply and remove stashresulgit stash apply [--index
- - Apply stash without removingresulgit stash drop [--index
- - Delete a stashresulgit stash clear
- - Clear all stashes
- resulgit tag list - List all tagsresulgit tag create --name
- - Create a tagresulgit tag delete --name
- - Delete a tag
- resulgit pr list - List pull requestsresulgit pr create --title
-
- Create pull request
- resulgit pr merge --id - Merge a pull request$3
-
resulgit current - Show current repository and branch
- resulgit head - Show HEAD commit ID
- resulgit show --commit - Show commit details
- resulgit log [--branch - Show commit history with visualization
- resulgit blame --path - Show line-by-line authorship information
- resulgit grep --pattern - Search for patterns in repository
- resulgit ls-files - List all tracked files
- resulgit reflog - Show reference log history
- resulgit cat-file --type - Display file/commit contents
- resulgit rev-parse --rev - Parse revision names to commit IDs
- resulgit describe [--commit - Describe a commit with nearest tag
- resulgit shortlog [--branch - Summarize commit log by author$3
-
resulgit hook list - List installed hooks
- resulgit hook install --name ] [--sample] - Install a hook
- resulgit hook remove --name - Remove a hook
- resulgit hook show --name - Show hook contentAvailable hooks:
pre-commit, post-commit, pre-push, post-push, pre-merge, post-merge, pre-checkout, post-checkoutGlobal Options
-
--server - Override default server
- --token - Override stored token
- --json - Output in JSON format
- --dir - Specify working directoryExamples
`bash
Login to server
resulgit auth login --email user@example.com --password mypasswordList repositories
resulgit repo listInitialize a new repository (creates folder + remote repo automatically)
resulgit init MyProjectOr clone an existing repository
resulgit clone MyProjectCheck status
cd MyProject
resulgit statusCreate and commit changes
resulgit add file.txt --content "Hello World"
resulgit commit -m "Add file.txt"
resulgit pushCreate a branch
resulgit branch create --name feature-branchMerge branches
resulgit merge --branch feature-branchView commit history with graph
resulgit log --max 20View commit history in one line
resulgit log --onelineView commit statistics
resulgit log --statsShow line-by-line authorship
resulgit blame --path src/index.jsSearch in repository
resulgit grep --pattern "TODO"List tracked files
resulgit ls-filesInstall a pre-commit hook
resulgit hook install --name pre-commit --sample
`Configuration
Configuration is stored in
~/.resulgit/config.json. You can set:
- server: Default server URL
- token: Authentication token
- workspaceRoot`: Default workspace directoryLicense
MIT