Clone contents of a GitHub repository (without the folder itself)

前端 未结 6 1258
梦谈多话
梦谈多话 2020-12-04 04:57

I\'d like to git clone the contents of a repository I have on GitHub. When I git clone (git@github:me/name.git...) I get a folder called name

6条回答
  •  情话喂你
    2020-12-04 05:30

    If the folder is not empty, a slightly modified version of @JohnLittle's answer worked for me:

    git init
    git remote add origin https://github.com/me/name.git
    git pull origin master
    

    As @peter-cordes pointed out, the only difference is using https protocol instead of git, for which you need to have SSH keys configured.

提交回复
热议问题