🤍 전 강의 25% 할인 중 🤍

2024년 상반기를 돌아보고 하반기에도 함께 성장해요!
인프런이 준비한 25% 할인 받으러 가기 >>

  • 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    해결됨

git 업데이트

23.06.03 11:11 작성 조회수 358

0

> git push -u origin master
To https://github.com/eunpse/preCamp.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/eunpse/preCamp.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

과제에 알려주신 방법으로 깃에 먼저 파일을 올렸다가, 내용을 수정하고 다시 깃에 올리려고 하는데 오류가 발생합니다. git pull을 해라 이런 말이 있는 것 같은데 어떻게 해야하나요?

답변 1

답변을 작성해보세요.

0

안녕하세요! 세은님!

github 사이트에서 직접 소스코드를 수정하셨거나, 또는 어떠한 방식으로든 github에 소스코드 변경사항이 존재하는 것 같네요!
따라서, 현재 기능을 업로드(push)하기 전에, 최신버전을 먼저 다운로드(pull) 받고, 더 최신 버전으로 업로드(push)를 하라는 뜻입니다!

따라서, 아래의 명령어를 통해서 최신버전을 먼저 다운로드(pull) 받아보세요!

git pull origin master
채널톡 아이콘