mirror of
https://github.com/daveberrys/guh.git
synced 2026-11-29 00:07:01 +08:00
DOCS, README, LICENSE
This commit is contained in:
1 parent
b0dc539715
commit
61ac03e7b4
3 files changed
+157
No files matched your search
@@ -0,0 +1,126 @@
|
||||
# guh CLI — Command Reference
|
||||
|
||||
## `guh`
|
||||
|
||||
Root command. Prints a welcome message when run without a subcommand.
|
||||
|
||||
```
|
||||
guh
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## `commit`
|
||||
|
||||
Add files and commit changes. Shows `git status --short` before committing.
|
||||
|
||||
```
|
||||
guh commit # show edited files only
|
||||
guh commit "." "message" # git add . && commit
|
||||
guh commit '["file1", "file2"]' "message" # add specific files && commit
|
||||
guh commit '["file1"]' "message" "description" # commit with message + description
|
||||
```
|
||||
|
||||
**Arguments**
|
||||
|
||||
| # | Name | Required | Description |
|
||||
|---|------|----------|-------------|
|
||||
| 1 | files | yes* | JSON array of files, or `"."` to add everything |
|
||||
| 2 | message | yes* | Commit message |
|
||||
| 3 | description | no | Optional commit description (uses `-m` twice) |
|
||||
|
||||
\*When no arguments are given, shows `git status --short` instead.
|
||||
|
||||
---
|
||||
|
||||
## `create`
|
||||
### `branch`
|
||||
|
||||
Create and switch to a new branch.
|
||||
|
||||
```
|
||||
guh create branch <branch>
|
||||
```
|
||||
|
||||
Equivalent to `git switch -c <branch>`.
|
||||
|
||||
### `account`
|
||||
|
||||
Save a GitHub account with username, email, and classic token.
|
||||
|
||||
```
|
||||
guh create account <username> <email> <classicToken>
|
||||
```
|
||||
|
||||
Credentials are stored in the user config directory under `dev.pages.codedave.guh/accounts.json`. All three values are required and must be non-empty.
|
||||
|
||||
---
|
||||
|
||||
## `diff`
|
||||
|
||||
Show working tree changes.
|
||||
|
||||
```
|
||||
guh diff
|
||||
```
|
||||
|
||||
Equivalent to `git diff`.
|
||||
|
||||
---
|
||||
|
||||
## `pull`
|
||||
|
||||
Fetch and pull upstream changes.
|
||||
|
||||
```
|
||||
guh pull
|
||||
```
|
||||
|
||||
Runs `git fetch` followed by `git pull`.
|
||||
|
||||
---
|
||||
|
||||
## `push`
|
||||
|
||||
Push local commits.
|
||||
|
||||
```
|
||||
guh push
|
||||
```
|
||||
|
||||
Equivalent to `git push`.
|
||||
|
||||
---
|
||||
|
||||
## `stash`
|
||||
|
||||
Stash current working directory changes.
|
||||
|
||||
```
|
||||
guh stash
|
||||
```
|
||||
|
||||
Equivalent to `git stash`.
|
||||
|
||||
---
|
||||
|
||||
## `switch`
|
||||
### `branch`
|
||||
|
||||
Switch to an existing branch.
|
||||
|
||||
```
|
||||
guh switch branch <name>
|
||||
```
|
||||
|
||||
Equivalent to `git switch <name>`.
|
||||
|
||||
### `account`
|
||||
|
||||
Switch to a saved GitHub account (updates global git config and credentials).
|
||||
|
||||
```
|
||||
guh switch account <username>
|
||||
```
|
||||
|
||||
Updates `user.name`, `user.email` in global git config, and overwrites `~/.git-credentials` with the stored token. The account must have been created with `guh create account` first.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License (MIT)
|
||||
|
||||
Copyright © 2026 Daveberry Cricket Blueson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the “Software”), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,10 @@
|
||||
# GUH (Git Utility(For) Helper(Noobs))
|
||||
Want to use the Git CLI and don't want to use the GitHub Desktop because you're "too cool"? But you don't know how to even use the git CLI? We've got you covered.
|
||||
|
||||
This tool is a simple CLI tool that wraps the git CLI (from `os/exec`) and provides a simple command-line interface for new Git CLI users.
|
||||
|
||||
## How to use it?
|
||||
Check out the [documentation](DOCS.md) for more information. That has all the CLI commands and usage instructions.
|
||||
|
||||
# LICENSE
|
||||
[MIT License](LICENSE)
|
||||
Reference in new issue
Block a user