Skip to content

Instantly share code, notes, and snippets.

@abakula1
Last active August 29, 2015 13:57
Show Gist options
  • Save abakula1/9696648 to your computer and use it in GitHub Desktop.
Save abakula1/9696648 to your computer and use it in GitHub Desktop.
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment