반응형

fatal: No configured push destination.

error message

$ git push
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using

    git remote add <name> <url>

and then push using the remote name

    git push <name>

현재 위치의 폴더가 깃허브의 원격 레포지토리랑 연결이 안되있다는 뜻이다.
깃허브에 있는 자신의 리모트 레포지토리 원격 저장소(origin)와 연동을 해야한다.

command

git remote add <name> <url>
=> git remote add origin <원격 레포지토리 저장소 url>

정상적으로 깃허브 원격 저장소에 push 확인.
git push --set-upstream origin main
명령어를 해주면 정상적으로 깃허브 원격 저장소에 push된 것을 볼 수 있다

덤.

git init
-> 현재 로컬 폴더를 깃 로컬저장소로 만들어주는 명령어

반응형
반응형

GIT clone SSL Certificate problem

problem text

SSL certificate problem: unable to get local issuer certificate

command

git config --global http.sslVerify false
반응형
반응형

GIT PUSH ERROR

 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/xxx'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

result

-> git push origin +master
기존 데이터의 손실을 막기 위해 푸시를 막음.

반응형
반응형

Git Clone unrelated histories error

error message

From https://github.com/[repo name]
 * branch            master     -> FETCH_HEAD
fatal: refusing to merge unrelated histories

doing

  • 신규로 만든 프로젝트와 기존에 있는 프로젝트는 공통 적으로 같은 조상을 보고 있지 않아서 서로 다른 프로젝트라고 인식 함.
  • 따라서 독립적인 두 프로젝트를 병합하기 위해 아래의 command 사용
    git pull origin [branch name] --allow-unrelated-histories
반응형

+ Recent posts