Skip to content

Instantly share code, notes, and snippets.

@abakula1
abakula1 / gi()
Last active August 29, 2015 13:57
Put a github link to your latest commit into your clipboard
gi(){
local githash=$(git log --pretty=format:'%H' -n 1)
local repoUrl=$(git ls-remote --get-url | sed 's/.*@//' | sed 's/.git//')
echo https://${repoUrl}/commit/${githash} | pbcopy
}