Git repository created without a master branch

前端 未结 3 1925
深忆病人
深忆病人 2020-12-24 13:13

I want to create a new shared git repository for a new project (on a VM).

I ran git --bare init from /.../git/new_proj.git, but a master br

3条回答
  •  忘掉有多难
    2020-12-24 13:41

    Bare git repos (repos created by issuing git init --bare) will not have a working tree attached to them. What you can do is go to the repo /.../git/new_proj.git and add the bare repo you created as a remote: git remote add bare_origin and then try pushing your commits to this bare_origin repo form there.

    Also, do you have any particular reason in creating a bare repository instead of a normal one?

提交回复
热议问题