2013-02-19 4 views
0

문제는 git 저장소가있어서 GitHub에 업로드하고 싶습니다. 나는 SOF에서 여러 스레드를 돌 았으며 git push -u origin master를 제안했습니다. 문제는 내가 그렇게 할 때 데이터를 잃지 않기 위해 먼저 병합해야한다는 것입니다. 그래서 그것은 내가 끌어 당기는 것을 제안했다. 나는 이것을했고 내가 얻은 것입니다 :git pull : 병합 할 브랜치를 알려주는 것

You asked me to pull without telling me which branch you 
want to merge with, and 'branch.master.merge' in 
your configuration file does not tell me, either. Please 
specify which branch you want to use on the command line and 
try again (e.g. 'git pull <repository> <refspec>'). 
See git-pull(1) for details. 

If you often merge with the same branch, you may want to 
use something like the following in your configuration file: 
    [branch "master"] 
    remote = <nickname> 
    merge = <remote-ref> 

    [remote "<nickname>"] 
    url = <url> 
    fetch = <refspec> 

See git-config(1) for details. 

어떻게 수정합니까?

편집 : 신경 쓰지 마세요. 너희들이 할 일 같은 문제가 발생할 경우 : 자식은 분기 마스터라고 가정

+1

물론, 왜 자식이 당신에게 알려주 는가? (''git pull ')')')하면 stackoverflow? –

+0

@Jeff, 질문을 닫거나 기존 답변을 수락하거나 자신의 답변을 게시하고 동의하는 것이 좋습니다. 그렇지 않으면이 질문은 "대답하지 않은 채로"남습니다. –

답변

3

을 끌어와 원격 원산지라고 : 원격 아직 설정하지 않은 경우

git pull origin master 

는 명령이 어떤 작업을 수행 할 수 그래서 :

git remote add origin [email protected]:username/repository.git 

두 경우 모두 Origin은 github 리모컨의 일반적인 이름입니다. 사용자 이름을 리포지토리 이름으로 바꾸십시오. 그런 다음 github 저장소를 "출발지"라고 부를 수 있습니다.

관련 문제