How do I check if a repository is bare?

后端 未结 5 915
小鲜肉
小鲜肉 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:21

    The message you’re getting means that your remote repository is empty (which has nothing to do with being bare). When pushing into a remote repository for the first time you need to specify what to push:

    git push origin master
    

    This will push your current master branch to the remote repository. Subsequent invocations of git push will pushing “matching” branches, i.e. if there’s a “master” branch in the remote repository your local “master” branch will be pushed to it.

提交回复
热议问题