Finding out the name of the original repository you cloned from in Git

前端 未结 8 1221
予麋鹿
予麋鹿 2021-01-30 01:51

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

8条回答
  •  野性不改
    2021-01-30 02:37

    Powershell version of command for git repo name:

    (git config --get remote.origin.url) -replace '.*/' -replace '.git'
    

提交回复
热议问题