SyntaxFix
Write A Post
Hire A Developer
Questions
If you want the whole GitHub repository name ('full name') - user/repository, and you want to do it in with Ruby...
git remote show origin -n | ruby -ne 'puts /^\s*Fetch.*:(.*).git/.match($_)[1] rescue nil'