A git sub-command to view your git repository in the web browser
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
sgoudham 41ad13e569 feat: implement `--path` option
closes #3
2 years ago
.github refactor: simplify docs and tidy up 2 years ago
.vscode refactor: simplify docs and tidy up 2 years ago
src feat: implement `--path` option 2 years ago
.gitignore chore: Unignore Cargo.lock 3 years ago
CONTRIBUTING.md docs: simplify wording 2 years ago
Cargo.lock build: Update version number to v1.0.0 2 years ago
Cargo.toml refactor: simplify docs and tidy up 2 years ago
LICENSE Initial commit 3 years ago
README.md feat: implement `--path` option 2 years ago

README.md

git-view

build crates.io downloads

A git sub-command to view your git repository in the web browser!

About

Are you also frustrated from moving your hands away from the keyboard to view your git repository in the browser?

Me too!!!

git-view alleviates that pain by allowing you to chuck away your mouse!

Note:
You should always use git view -h instead of git view --help as the manpage/html files are NOT included.

Features

  • View Branches, Commits & Issues
  • Custom Suffix
  • Custom Remote
  • View Current Directory

Installation

Binaries are available here.

Cargo

cargo install git-view

Homebrew

brew tap sgoudham/tap
brew install git-view

Usage

$ git view
# View https://github.com/TRACKED_REMOTE_USER/REPO/tree/CURRENT_BRANCH

$ git view --remote remote
# View https://github.com/PROVIDED_REMOTE_USER/REPO/tree/CURRENT_BRANCH

$ git view --remote remote --branch branch
# View https://github.com/PROVIDED_REMOTE_USER/REPO/tree/PROVIDED_BRANCH

$ git view --commit
# View https://github.com/TRACKED_REMOTE_USER/REPO/tree/CURRENT_COMMIT

$ git view --commit efa38be50ad34d
# View https://github.com/TRACKED_REMOTE_USER/REPO/tree/efa38be50ad34d

$ git view --issue
# Given branch 'TICKET-123' or some other variation
# View https://github.com/TRACKED_REMOTE_USER/REPO/issues/123

$ git view --issue 42
# View https://github.com/TRACKED_REMOTE_USER/REPO/issues/42

$ git view --suffix releases
# Given branch 'TICKET-123' or some other variation
# View https://github.com/TRACKED_REMOTE_USER/REPO/releases

$ git view --print
# Prints https://github.com/TRACKED_REMOTE_USER/REPO/tree/CURRENT_BRANCH

Help

git-view 1.0.0
Goudham Suresh <sgoudham@gmail.com>
A git sub-command to view your git repository in the web browser

USAGE:
    git-view [OPTIONS]

OPTIONS:
    -r, --remote <name>      The remote to view git repository on
                             [default: default remote]
    -b, --branch <name>      The branch to view git repository on
                             [default: current branch]
    -c, --commit <hash>      The commit to view git repository on
                             [default: current commit]
    -s, --suffix <suffix>    A suffix to append onto the git repository URL
    -i, --issue <issue>      The issue number to view
                             [default: open issue from remote branch]
    -p, --print              Don't open browser and print the URL
    -h, --help               Print help information
    -V, --version            Print version information

Contributing

Please read the CONTRIBUTING.md before contributing!

License

MIT

Acknowledgement

The idea for this project came about from an existing project git-open