How to give a git repo a name?

后端 未结 3 2005
粉色の甜心
粉色の甜心 2021-02-19 21:35

I am making a remote repo by using these command

mkdir NewRepo
cd NewRepo
git init

Then I clone this rep

3条回答
  •  野的像风
    2021-02-19 22:06

    Repositories don't have names, you just use the folder name (I suppose you could name the folder "app.git":

    git clone user@server:/path/to/app
    

    Remotes do have names, e.g. "origin" or whatever you like. This is up to the client though, not a property of the remote repository.

    git remote add origin user@server:/path/to/app
    

提交回复
热议问题