git-github

Crates.iogit-github
lib.rsgit-github
version0.1.4
sourcesrc
created_at2023-07-24 03:57:11.672457
updated_at2024-11-27 07:19:12.460294
descriptiongit command line plugin of github
homepage
repository
max_upload_size
id924224
size48,736
Dalei (daleione)

documentation

README

git-github-open

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.

Features

  • Multi-Platform Support: Opens remote repository URLs for GitHub and GitLab.
  • Quick Branch Access: Specify a branch to open.
  • View Specific Commits: Open a specific commit page directly.
  • Custom Remote Repository: Specify different remote names (default is origin).

Installation

# Install using `cargo`
cargo install git-github

Usage

Open the default remote repository page

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

Open a specific branch page

Use the -b or --branch option to open a specific branch. For example, to open the develop branch:

git github open --branch develop

Open a specific commit page

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

Specify a remote repository name

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

Full Options List

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

Examples

  1. Open the repository homepage

    git github open
    

    This will open the homepage of the origin remote repository by default.

  2. Open the develop branch

    git github open --branch develop
    

    This will open the develop branch of the origin remote repository.

  3. View a specific commit

    git github open --commit abc1234
    

    This will open the specific commit page for commit ID abc1234.

  4. Specify a remote name

    git github open --remote upstream
    

    This will open the homepage of the upstream remote repository.

Contributing

We welcome contributions via Issues or Pull Requests! If you have any questions or suggestions, feel free to reach out.

License

This project is licensed under the MIT License.

Commit count: 0

cargo fmt