It is very likely that the name of the folder of your project is the name of your github repo. If you run this in a terminal:
git config --global alias.hub "!f () { local REPO; local URL; [[ -f .githubrepo ]] && REPO=\"$(head -n 1 .githubrepo)\" || REPO=\"${PWD##*/}\"; URL=\"https://github.com/math2001/$REPO\"; if [[ \"$1\" == i ]]; then URL=\"$URL/issues\"; elif [[ \"$1\" == s ]]; then URL=\"$URL/settings\"; elif [[ \"$1\" == p ]]; then URL=\"$URL/pulls\"; elif [[ \"$1\" == w ]]; then URL=\"$URL/wiki\"; elif [[ \"$1\" == b ]]; then URL=\"$URL/branches\"; elif [[ \"$1\" == r ]]; then URL=\"$URL/releases\"; elif [[ \"$1\" == 'in' ]]; then URL=\"$URL/issues/new\"; fi; echo \"Opening $URL\"; start \"$URL\"; }; f"
replace math2001
by, you guessed it, your username
you will then be able to do this:
~/AppData/Roaming/Sublime Text 3/Packages/JSONComma → master
λ git hub # opens https://github.com/<your_user_name>/JSONComma
~/AppData/Roaming/Sublime Text 3/Packages/JSONComma → master
λ git hub i # opens https://github.com/<your_user_name>/JSONComma/issues
~/AppData/Roaming/Sublime Text 3/Packages/JSONComma → master
λ git hub p # opens https://github.com/<your_user_name>/JSONComma/pulls
~/AppData/Roaming/Sublime Text 3/Packages/JSONComma → master
λ git hub w # opens https://github.com/<your_user_name>/JSONComma/wiki
~/AppData/Roaming/Sublime Text 3/Packages/JSONComma → master
λ git hub in # opens https://github.com/<your_user_name>/JSONComma/issues/new
~/AppData/Roaming/Sublime Text 3/Packages/JSONComma → master
λ git hub whatever # opens https://github.com/<your_user_name>/JSONComma/whatever
If the folder you're in isn't the name of your repo, you can add a .githubrepo
with, on the first line, the name of your repo. Not the URL, just the name:
For example:
st-user-package
And then, instead of using the folder name, it will use st-user-package
.
👌 😄