Skip to content

Instantly share code, notes, and snippets.

@EstebanMqz
Last active October 14, 2023 16:55
Show Gist options
  • Save EstebanMqz/46667ed13be43dec54badcd811717e82 to your computer and use it in GitHub Desktop.
Save EstebanMqz/46667ed13be43dec54badcd811717e82 to your computer and use it in GitHub Desktop.
Interactive Git Web History Shell Program

Git web history

#!/bin/bash
# Description: githistory interactive shell to web-browse a git remote with filename using http-protocol default browser.

username=$1
repository=$2
branch=$3
filename=$4

echo opening $username, $repository, $branch, $filename githistory shell in default browser..
githistory() {
    git web--browse "https://github.githistory.xyz/$username/$repository/blob/$branch/$filename"
}
githistory "$@" #Pass all args. to githistory().
exit 0

#Command
./githistory.sh username repository branch filename
Interactivity e.g:

git-web_history

Description
Type: Bash Script ( .sh )
Usage: Shell Script to web-browse githistory of a git remote with http-protocol as user's default browser in OS registry.
Check http-protocol:
reg query HKEY_CLASSES_ROOT\http\shell\open\command
Author: Resume LinkedIn Business Gmail Github GitLab
Tags: Windows Regedit   git bash  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment