Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oren0e/gitopen
A command line utility to open git repository page in the browser from the repository location in terminal
https://github.com/oren0e/gitopen
bitbucket command-line-tool git github gitlab rust termial
Last synced: 2 months ago
JSON representation
A command line utility to open git repository page in the browser from the repository location in terminal
- Host: GitHub
- URL: https://github.com/oren0e/gitopen
- Owner: oren0e
- License: gpl-3.0
- Created: 2021-10-29T09:50:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-29T20:02:17.000Z (9 months ago)
- Last Synced: 2024-10-01T15:08:15.722Z (3 months ago)
- Topics: bitbucket, command-line-tool, git, github, gitlab, rust, termial
- Language: Rust
- Homepage:
- Size: 48.8 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![example workflow name](https://github.com/oren0e/gitopen/workflows/CI/badge.svg)
# Overview
A command line utility to open git repository page in the browser from the repository location in terminal.
Currently tested only on mac (prior to M1 chip).# Installation
Note: You have to have rust installed with cargo to be able to install this utility.
### From Github (this repository)
1. Clone the repo
2. Run `make install` from the repo's directory### From crates.io with Cargo
1. Run `cargo install gitopen`
(From [The Book](https://doc.rust-lang.org/book/ch14-04-installing-binaries.html): "All binaries installed with `cargo install` are stored in the installation root’s bin folder. If you installed Rust using rustup.rs and don’t have any custom configurations, this directory will be `$HOME/.cargo/bin`. Ensure that directory is in your `$PATH` to be able to run programs you’ve installed with `cargo install`.")# Usage
Basic usages:
- When in git repository in terminal, run `gitopen`.
- After you've opened a branch and you are ready to push and open a PR, run `gitopen -p`. This will push the changes to the current branch and open the PR in the browser. This can be done at any stage during the work on the PR, not just when you're making the first push.
- You can open a specific commit. Use `gitopen -c COMMIT` where COMMIT is the commit SHA.
- You can open a specific line number of a file. Use `gitopen -l :`(note that you **have** to use the `:` separator between the file path and the line number). Example:```
> gitopen -l /src/main.rs:10
```- If you've added a remote (other than `origin` which is the default) e.g. for a forked repository so the remote is the original repository URL, you can use gitopen to open that remote by specifying its name, for example:
```
> gitopen -r upstream
```Note that `gitopen -r origin` is the same as `gitopen`.
For help, use `gitopen --help`