Why can't I push to this bare repository?

后端 未结 6 1961
生来不讨喜
生来不讨喜 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:46

    If you:

     git push origin master
    

    it will push to the bare repo.

    It sounds like your alice repo isn't tracking correctly.

    cat .git/config
    

    This will show the default remote and branch.

    If you

     git push -u origin master
    

    You should start tracking that remote and branch. I'm not sure if that option has always been in git.

提交回复
热议问题