Skip to content

Commit

Permalink
hub-*: add page (#11228)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
  • Loading branch information
WangLinSongss and sebastiaanspeck authored Oct 25, 2023
1 parent 015e62b commit 4a15348
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pages/common/hub-branch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# hub branch

> Create a branch or show current branch.
> See also `git branch`.
- Show the name of the currently active branch:

`hub branch`

- Create a new branch:

`hub branch {{branch_name}}`
16 changes: 16 additions & 0 deletions pages/common/hub-browse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# hub browse

> Open a GitHub repository in the browser or print the URL.
> More information: <https://cli.github.com/manual/hub_browse>.
- Open the homepage of the current repository in the default web browser:

`hub browse`

- Open the homepage of a specific repository in the default web browser:

`hub browse {{owner}}/{{repository}}`

- Open the subpage of a specific repository in the default web browser, subpage can be "wiki", "commits", "issues", or other (default: "tree"):

`hub browse {{owner}}/{{repository}} {{subpage}}`
12 changes: 12 additions & 0 deletions pages/common/hub-ci-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# hub ci-status

> Display status of GitHub checks.
> More information: <https://hub.github.com/hub-ci-status.1.html>.
- Check the CI status for this branch:

`hub ci-status --verbose`

- Display status of GitHub checks for a commit:

`hub ci-status --verbose {{commit_SHA}}`
8 changes: 8 additions & 0 deletions pages/common/hub-clone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# hub clone

> Clone an existing repository.
> More information: <https://hub.github.com/hub-clone.1.html>.
- Clone an existing repository to current directory (If run into authentication problem, try full ssh path):

`hub clone {{remote_repository_location}}`
12 changes: 12 additions & 0 deletions pages/common/hub-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# hub create

> Create a new repository on GitHub.
> More information: <https://hub.github.com/hub-create.1.html>.
- Upload the current (local-only) repository to your GitHub account as public:

`hub create`

- Create a private repository and open the new repository in a web browser:

`hub create --private --browse`
8 changes: 8 additions & 0 deletions pages/common/hub-delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# hub delete

> Delete an existing repository on GitHub.
> More information: <https://hub.github.com/hub-delete.1.html>.
- Delete personal repo on GitHub:

`hub delete {{repo}}`
16 changes: 16 additions & 0 deletions pages/common/hub-fork.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# hub fork

> Fork the given GitHub repo. Like `git fork` from `git-extras`.
> More information: <https://hub.github.com/hub-fork.1.html>.
- Fork a GitHub repository by its slug:

`hub fork {{tldr-pages/tldr}}`

- Fork a GitHub repository by its URL:

`hub fork {{https://github.com/tldr-pages/tldr}}`

- Fork current GitHub repository, set remote name to origin:

`hub fork --remote-name {{origin}}`
8 changes: 8 additions & 0 deletions pages/common/hub-init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# hub init

> Initializes a new local git repository.
> More information: <https://hub.github.com/hub-init.1.html>.
- Initialize a new local repository:

`hub init`
16 changes: 16 additions & 0 deletions pages/common/hub-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# hub issue

> Manage Github issues.
> More information: <https://hub.github.com/hub-issue.1.html>.
- List the last 10 issues with the `bug` label:

`hub issue list --limit {{10}} --labels "{{bug}}" `

- Display a specific issue:

`hub issue show {{issue_number}}`

- List 10 closed issues assigneed to a specific user:

`hub issue --state {{closed}} --assignee {{username}} --limit {{10}}`

0 comments on commit 4a15348

Please sign in to comment.