Git push only for bare repositories?

后端 未结 2 1753
难免孤独
难免孤独 2020-11-27 19:11

When I tried \'git push origin master\' to remote repository on my external disk, git warning occured stating that pusing to checkout repository will in next releases of git

2条回答
  •  孤城傲影
    2020-11-27 19:46

    You shouldn't push to a non-bare repository because pushing will only update the internal state of the repo, and won't affect the checked-out, on-disk copies of the files. Thus, you could run into problems if you start doing work in that repo without first updating (via git checkout) the on-disk copies of the state of the files in the repo.

提交回复
热议问题