How do I check if a repository is bare?

后端 未结 5 904
小鲜肉
小鲜肉 2020-11-30 05:10

I\'m getting the warning

warning: You did not specify any refspecs to push, and the current remote
warning: has not configured any push refspecs. The default         


        
5条回答
  •  隐瞒了意图╮
    2020-11-30 05:42

    It doesn't sound like that was your problem, but to actually answer the question you asked in the title: you can run...

    $ git rev-parse --is-bare-repository
    

    ...to query if a repo is bare or not. Returns 'true' or 'false'.

提交回复
热议问题