서버의 gitosis가 관리하는 git 저장소로 푸시하려고합니다. 어떻게 든 gitosis에서 비 맨발 저장소가 있습니까?
[email protected]:~/lyre$ git push
Enter passphrase for key '/home/william/.ssh/id_dsa':
Counting objects: 9, done.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 705 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)
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 r:lyre
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'r:lyre'
나는이 질문을 발견 :
Git push error '[remote rejected] master -> master (branch is currently checked out)'
을하고 행운과 함께, 거기에 대답을 시도 내가 누르면,이 오류가 발생합니다. 원격 저장소는 gitosis로 설정되었으므로 .git
폴더가 없습니다. 작업 트리 나 체크 아웃 된 분기가 없어야합니다.
저장소 폴더 구조
는 다음과 같습니다[email protected]:/home/git/repositories/lyre.git$ ls -hal
total 40K
drwxr-xr-x 7 git users 4.0K May 24 12:58 .
drwxr-xr-x 5 git users 4.0K May 4 2011 ..
drwxr-xr-x 2 git users 4.0K May 4 2011 branches
-rw-rw-r-- 1 git users 66 May 24 12:58 config
-rw-r--r-- 1 git users 73 May 4 2011 description
-rw-r--r-- 1 git users 23 May 4 2011 HEAD
drwxr-xr-x 2 git users 4.0K May 4 2011 hooks
drwxr-xr-x 2 git users 4.0K May 4 2011 info
drwxr-xr-x 163 git users 4.0K Apr 26 15:26 objects
drwxr-xr-x 4 git users 4.0K May 4 2011 refs
[email protected]:/home/git/repositories/lyre.git$ cd branches/
[email protected]:/home/git/repositories/lyre.git/branches$ ls -hal
total 8.0K
drwxr-xr-x 2 git users 4.0K May 4 2011 .
drwxr-xr-x 7 git users 4.0K May 24 12:58 ..
어떻게이 혼란에서 빠져 나와 저장소에 밀어 수 있습니까?
원격 저장소가 어떻게 보이나요? 1 차 수준 폴더는 무엇입니까? – CharlesB
@CharlesB 저장소 폴더 구조를 추가했습니다. –
'branches' 디렉토리 란 무엇입니까? 내 벌거 벗은 리포지터리에 있지 않아, 그 내용을 확인할 수 있니? – CharlesB