https://github.com/yuler/tmp
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuler/tmp
- Owner: yuler
- Created: 2023-10-18T08:11:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-07T02:51:53.000Z (over 1 year ago)
- Last Synced: 2026-01-28T06:10:22.454Z (5 months ago)
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gh-upload
[GitHub CLI] extension for upload folders/files to `static` repo
## How it works
- Create blob for every files
- Get latest sha from default branch
- Create tree w/ blobs and latest sha
- Post commit w/ tree and latest sha
- Update default branch ref
## Usage
You need to create a repository named `static` first. You can use `gh repo create static --public` to create it.
```bash
gh extension install yuler/gh-upload
# Create alias dl => download
gh alias set up "upload"
gh up -h
```
## Example
```bash
# Upload README.md file to 'static' repo
gh upload README.md
# With commit message
gh upload -m "Update for readme" README.md
# With specify repo
gh upload -r "tmp" README.md
gh upload -r "yuler/tmp" README.md
# With specify branch
gh upload -r "yuler/tmp" -b "docs" README.md
```