Crates.io | git-github |
lib.rs | git-github |
version | 0.1.4 |
source | src |
created_at | 2023-07-24 03:57:11.672457 |
updated_at | 2024-11-27 07:19:12.460294 |
description | git command line plugin of github |
homepage | |
repository | |
max_upload_size | |
id | 924224 |
size | 48,736 |
git-github-open
is a convenient Git command plugin that allows you to quickly open the remote repository URL in your browser. It supports both GitHub and GitLab, making it easier for developers to access remote repositories, specific branches, or commit records for code review, changes, or sharing.
origin
).# Install using `cargo`
cargo install git-github
Run the following command in the root directory of your repository to open the main page of the remote repository in your browser:
git github open
Use the -b
or --branch
option to open a specific branch. For example, to open the develop
branch:
git github open --branch develop
Use the -c
or --commit
option to open a specific commit page. For example, to open a commit with ID abc1234
:
git github open --commit abc1234
If the remote repository name is not origin
, you can use the -r
or --remote
option to specify it. For example:
git github open --remote upstream
Usage: git-github open [OPTIONS]
Options:
-c, --commit <COMMIT> Open a specific commit page
-b, --branch <BRANCH> Open a specific branch page
-r, --remote <REMOTE> Specify the remote repository name (default: origin)
-h, --help Print help
Open the repository homepage
git github open
This will open the homepage of the origin
remote repository by default.
Open the develop
branch
git github open --branch develop
This will open the develop
branch of the origin
remote repository.
View a specific commit
git github open --commit abc1234
This will open the specific commit page for commit ID abc1234
.
Specify a remote name
git github open --remote upstream
This will open the homepage of the upstream
remote repository.
We welcome contributions via Issues or Pull Requests! If you have any questions or suggestions, feel free to reach out.
This project is licensed under the MIT License.