When you do your first clone using the syntax
git clone username@server:gitRepo.git
Is it possible using your local repository to find the name
This is quick Bash command, that you're probably searching for, will print only a basename of the remote repository:
Where you fetch from:
basename $(git remote show -n origin | grep Fetch | cut -d: -f2-)
Alternatively where you push to:
basename $(git remote show -n origin | grep Push | cut -d: -f2-)
Especially the -n
option makes the command much quicker.