These are aliases for the hub git wrapper tool.
See mislav/hub#1904
Copy these into your ~/.gitconfig
file.
#Open HEAD branch:
git browse-tree
#Open specific branch/tree:
git browse-tree some_branch
#Open HEAD commit:
git browse-commit
#Open specific commit:
git browse-commit 1c2306d92ab0ae621991668879f85c750c576697
#Open file inside HEAD tree - should work within subdirectories also:
git browse-file some.file
# Open any PRs from current branch on same repo
git browse-pr
For browse-pr
, on non-mac platforms you can just remove |xargs open
or replace open
with whatever command you use to open a web browser to a specific URL.