2014-02-23 5 views
0

달성하고자하는 것 ---git 저장소 및 작업 복사본으로 로컬 디렉토리

나는 자식에 대해 거의 알지 못하고 그것을 배우려고합니다. 내 서버에 자식이 설치되어 있지 않습니다.

따라서 저장소의 디렉토리 역할을 할 시스템에 폴더 (Git Repos Folder)를 생성하려고합니다. (GitHub에서 생성 된 리포지토리와 유사)와 다른 폴더 (Git Clones Folder)를 사용하여 리포지토리를 복제하고 작업 할 수 있습니다 (github 리포지토리의 로컬 클론처럼).

나는 힘내 레 포스 폴더에서 각 저장소에 폴더를 저지하고 힘내 클론의 저장소의에서 밀어 수 있어야합니다.

내가 시도 무엇 -

나는 힘내 레 포스 폴더 내부 praveenpuglia.com라는 이름의 repo를 생성하고 자식 저장소 만들기 위해 git init을 달렸다.

다음으로 나는, 나는 추가 정보 파일을 넣어

git clone D:/Git Repos Folder/praveenpuglia.com를 사용하여 폴더망할 놈의 클론 내부 praveenpuglia.com로 REPO를 복제 개최하고 최선을 다하고 있습니다.

나는 마스터에 대한 변경 사항을 밀어하려고

, 내가 얻을 이러한 오류 내가 잘못하고있는 중이 야하고 어떻게 그것을 설정하는 일

Pushing to D:/Git Repos Folder/praveenpuglia.com 
remote: error: refusing to update checked out branch: refs/heads/master[K 
remote: error: By default, updating the current branch in a non-bare repository[K 
remote: error: is denied, because it will make the index and work tree inconsistent[K 
remote: error: with what you pushed, and will require 'git reset --hard' to match[K 
remote: error: the work tree to HEAD.[K 
remote: error: [K 
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to[K 
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into[K 
remote: error: its current branch; however, this is not recommended unless you[K 
remote: error: arranged to update its work tree to match what you pushed in some[K 
remote: error: other way.[K 
remote: error: [K 
remote: error: To squelch this message and still keep the default behaviour, set[K 
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.[K 
To D:/Git Repos Folder/praveenpuglia.com 
! [remote rejected] master -> master (branch is currently checked out) 
error: failed to push some refs to D:/Git Repos Folder/praveenpuglia.com' 

? 나는 여기 몇 가지 대답을 시도했지만 이해할 수 없었다.

+0

이 책을 읽고, 그것은 도움이 될 것입니다 :) http://git-scm.com/book – user376507

답변

1

원격 저장소로 푸시하려는 경우 맨 저장소로 만들어야합니다. 당신은에 의해 베어 원격 저장소를 변환 할 수 있습니다

git config --bool core.bare true 
+0

나는 그것을했고, 클론 밀었다. 그것은 밀려났다. 그러나 푸시 된 파일은 ** D :/Git Repos Folder/praveenpuglia.com ** 폴더에 반영되지 않습니다. –

+0

원격 저장소에서 'git log'를 확인하십시오. 모든 커밋을 보시겠습니까? – demas

+0

로그에는 readme 파일이 표시되지 않지만 커밋이 표시됩니다. 저자 : Praveen Puglia <[email protected]> 날짜 : Sun Feb 23 20:38:48 2014 +0530 최초의 커밋. Readme가 추가되었습니다. –

관련 문제