새 git 창고는push 할 수 없습니다

1248 단어 git
새로 만든git 창고pull이 끝난 후에 파일push를 추가할 때 알림
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To /***/***/***
 ! [remote rejected] master -> master (branch is current

창고를 만드는 명령은 다음과 같은 두 가지가 있기 때문이다
git init     git init --bare 

제가 쓰는 게 첫 번째예요.
원격 저장소 만들기
.45, 6, 7, 913. 그리고 제대로 푸시할 수 있어요.

좋은 웹페이지 즐겨찾기