cannot push into git repository

前端 未结 7 815
既然无缘
既然无缘 2020-12-02 07:19

This is what I have done so far and I will say this procedure worked on Ubuntu 9.10 which perhaps had a different version of git.

server: mkdir ~/git

local:         


        
相关标签:
7条回答
  • 2020-12-02 08:00

    Since you ran git init on the server you created a working directoy but I think you wanted to make a bare repository instead.

    Use a working directory when you want to add, edit and delete files in your project locally on your dev machine.

    When you want to share your project, make a bare repository by git init --bare project.git on the server then clone it to your machine and you will be able to push to it.

    If you don't want to create a new one now then you can clone your project into a new bare repo by git clone --bare project new-bare-project.git

    0 讨论(0)
提交回复
热议问题