Does git have a built-in command for showing the name of the current remote project? Right now I\'m using this:
git remote -v | head -n1 | awk \'{print $2}\' | s
Chained head awk and sed calls like this
head
awk
sed
git remote -v | head -n1 | awk '{print $2}' | sed 's/.*\///' | sed 's/\.git//'
can be combined into one sed call like this:
git remote -v | sed -rn '1s#.*/(.*)\.git.*#\1#p'