{"id":21185749,"url":"https://github.com/unacro/gh","last_synced_at":"2025-12-29T18:04:56.133Z","repository":{"id":188364344,"uuid":"368787941","full_name":"unacro/gh","owner":"unacro","description":"Scripts to better use Git","archived":false,"fork":false,"pushed_at":"2021-06-01T07:44:26.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T12:47:27.099Z","etag":null,"topics":["git","powershell"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unacro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-05-19T07:55:26.000Z","updated_at":"2021-06-01T07:44:29.000Z","dependencies_parsed_at":"2023-08-15T02:51:45.098Z","dependency_job_id":null,"html_url":"https://github.com/unacro/gh","commit_stats":null,"previous_names":["unacro/gh"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unacro%2Fgh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unacro%2Fgh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unacro%2Fgh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unacro%2Fgh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unacro","download_url":"https://codeload.github.com/unacro/gh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243639559,"owners_count":20323510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","powershell"],"created_at":"2024-11-20T18:18:48.839Z","updated_at":"2025-12-29T18:04:56.056Z","avatar_url":"https://github.com/unacro.png","language":"PowerShell","readme":"\u003ch1 align=\"center\"\u003e🚀 Git Helper Scripts Using PowerShell\u003c/h1\u003e\n\n\u003cp  align=\"center\"\u003e\n    \u003ca href=\"https://github.com/sumisos/gh\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/sumisos-gh-blue?logo=github\" alt=\"Github Repository\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/sumisos/gh/blob/main/LICENSE\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-green\" alt=\"Package License\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/sumisos/gh/tags\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/sumisos/gh?label=Version\" alt=\"Release Version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/sumisos/gh/blob/main/README.zh-CN.md\" target=\"_blank\"\u003e\u003cimg src=\"https://img.shields.io/badge/中文-文档-green\" alt=\"Release Version\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Install\n```bash\n$ git submodule add https://github.com/sumisos/gh.git\n```\n\n## Usage\n* Configuration file(`.env`) will be generated if not exists  \n* It also works if moved `ci.ps1` to parent path  \n\n```\nYour-Project/\n ├── .git/       # git repo meta info\n ├── gh/\n │ ├── .env      # config file\n │ ├── core.ps1  # core function\n │ ├── ci.ps1    # starter\n │ └── ...\n └── ...         # your project\n```\n\nBecome：  \n```\nYour-Project/\n ├── .git/       # git repo meta info\n ├── gh/\n │ ├── .env      # config file\n │ ├── core.ps1  # core function\n │ ├── ci.ps1    # starter\n │ └── ...\n └── ci.ps1      # starter copy\n └── ...         # your project\n```\n\n`.\\gh\\ci.ps1` / `.\\ci.ps1` will be both effective.  \n\nBesides, you can keep it after updated scripts to new version.  \n**By and large**, content of the `ci.ps1` file would NOT change.  \n\n### Configuration `.env`\n```\nCOMMAND_SAVE=save  # save func alias\nCOMMAND_DIST=dist  # dist func alias\nBRANCH_MAIN=main   # old repo is master. nice try. CLM!\nAUTO_DELETE=       # **CAUTION** auto delete path\nENABLE_GITLAB=     # name of another remote repo\nDEBUG=false        # enable debug mode (log command to console instead of exec)\n```\n\n### Windows\n```powershell\n$ .\\gh\\ci.ps1 \u003cCOMMAND\u003e [COMMIT MESSAGE]\n```\n\n* `\u003cCOMMAND\u003e`: `save` or `dist` (you may edit it in `.env`)  \n* `[COMMIT MESSAGE]`: commit message  \n\n#### General\nAdd untracked files to Staged:  \n\n```powershell\n$ .\\gh\\ci.ps1\n```\n\n#### Save\nCommit changed files \u0026 push to remote @ **CURRENT branch**:  \n\n```powershell\n$ .\\gh\\ci.ps1 save\n```\n\n\u003e Default commit message will be like `Updated @yyyy-MM-dd HH:mm:ss`.  \n\n---\n\nYou may edit a long commit message (recommend using quotes):  \n```powershell\n$ .\\gh\\ci.ps1 save \"fix: It's a very long commit message \u0026 Closes #123, #456\"\n```\n\n---\n\nYou may save the quotes:  \n```powershell\n$ .\\gh\\ci.ps1 save commit message without special syntax\n```\n\n---\n\nYou may save the \"save\":  \n```powershell\n$ .\\gh\\ci.ps1 s\n```\n\n---\n\nIt's also support edit commit message:  \n```powershell\n$ .\\gh\\ci.ps1 sa init\n```\n\n#### Distribute\nPush `main` branch by merge current branch with keeping in:  \n\n```powershell\n$ .\\gh\\ci.ps1 dist\n$ .\\gh\\ci.ps1 d # notice \"d\" not in \"save\" because save is first\n```\n\n### Linux\n```bash\n$ chmod +x ./gh/ci\n$ ./gh/ci\n```\n\n## Update\n```bash\n$ git submodule update --rebase --remote\n```\n\nYou may also use update command alias in Windows:  \n```bash\n$ .\\gh\\ci.ps1 update\n```\n\nor in Linux:  \n```bash\n$ ./gh/ci update\n```\n\n## TODO\n- [x] Support config file to customize script  \n- [x] Default NOT push to Gitee  \n- [ ] Refactor shell version to support Linux  \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funacro%2Fgh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funacro%2Fgh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funacro%2Fgh/lists"}