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
I use this:
basename $(git remote get-url origin) .git
Which returns something like gitRepo. (Remove the .git at the end of the command to return something like gitRepo.git.)
gitRepo
.git
gitRepo.git
(Note: It requires Git version 2.7.0 or later)