Cannot git clone a folder on a server and then edit and git push?

后端 未结 5 792
温柔的废话
温柔的废话 2021-01-14 23:41

I used Mercurial (Hg) before, and it was ok to do something like at the local PC:

hg clone ssh://peter@hostingcompany.com/~/mysite.com

and

5条回答
  •  再見小時候
    2021-01-15 00:08

    In Git it is usually a good practice to have the repo on the server to which other people push to be a bare repository. It is highly recommended.

    git init . --bare
    

    Here it is failing because you are pushing to a non-bare ( with a working copy ) repo and to the branch that is checked out.

提交回复
热议问题