Why can't I push to this bare repository?

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

    This related question's answer provided the solution for me... it was just a dumb mistake:

    Remember to commit first!

    https://stackoverflow.com/a/7572252

    If you have not yet committed to your local repo, there is nothing to push, but the Git error message you get back doesn't help you too much.

提交回复
热议问题