Why can't I push to this bare repository?

后端 未结 6 1962
生来不讨喜
生来不讨喜 2020-12-07 07:10

Can you explain what is wrong with this workflow?

$ git init --bare bare
Initialized empty Git repository in /work/fun/git_experiments/bare/
$ git clone bare         


        
6条回答
  •  盖世英雄少女心
    2020-12-07 07:35

    git push --all
    

    is the canonical way to push everything to a new bare repository.

    Another way to do the same thing is to create your new, non-bare repository and then make a bare clone with

    git clone --bare
    

    then use

    git remote add origin 
    

    in the original (non-bare) repository.

提交回复
热议问题