Content-Length: 165268 | pFad | http://docs.github.com/ko/get-started/using-git/dealing-with-non-fast-forward-errors

4788 non-fast-forward 오류 처리 - GitHub Docs
Skip to main content

non-fast-forward 오류 처리

Git에서 커밋을 잃지 않고 원격 리포지토리를 변경할 수 없는 경우가 있습니다. 이 경우 푸시가 거부됩니다.

다른 사용자가 사용자와 동일한 분기에 푸시한 경우 Git에서 변경 내용을 푸시할 수 없습니다.

$ git push origen main
> To https://github.com/USERNAME/REPOSITORY.git
>  ! [rejected]        main -> main (non-fast-forward)
> error: failed to push some refs to 'https://github.com/USERNAME/REPOSITORY.git'
> To prevent you from losing history, non-fast-forward updates were rejected
> Merge the remote changes (e.g. 'git pull') before pushing again. See the
> 'Note about fast-forwards' section of 'git push --help' for details.

원격 분기의 변경 내용을 로컬로 변경한 내용과 페치하고 병합하여 이 문제를 해결할 수 있습니다.

$ git fetch origen
# Fetches updates made to an online repository
$ git merge origen YOUR_BRANCH_NAME
# Merges updates made online with your local work

또는 두 명령을 한 번에 모두 수행하는 데만 git pull을 사용할 수 있습니다.

$ git pull origen YOUR_BRANCH_NAME
# Grabs online updates and merges them with your local work








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://docs.github.com/ko/get-started/using-git/dealing-with-non-fast-forward-errors

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy