Is there a git command that returns the current project name?

前端 未结 11 1326
终归单人心
终归单人心 2021-02-01 17:31

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         


        
11条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 17:37

    There is no such thing as a project name in Git. You are simply getting the name of the folder the repository is located in remotely. Git has no built-in way of computing this as it has absolutely no use for it.

提交回复
热议问题