기록
Home
  • 분류 전체보기 (187)
    • Programming (109)
      • JAVA (15)
      • Javascript (0)
      • 데이터베이스 (8)
      • React (7)
      • 프레임워크 (1)
      • Spring (11)
      • 웹(Web) (4)
      • 운영체제 (5)
      • 서버&네트워크 (6)
      • 자료구조 (0)
      • 알고리즘 (1)
      • 형상관리 (0)
      • 에러노트 (35)
      • 개발 툴 (15)
      • TEMP. (1)
    • Project (0)
      • 트러블슈팅 (0)
    • Personal (1)
      • 리뷰 (1)
      • 업무 (0)
    • Course (0)
      • 모든 개발자를 위한 HTTP 웹 기본 지식 (1)
      • 스프링 핵심 원리 - 기본편 (51)
      • 자바 ORM 표준 JPA 프로그래밍 - 기본편 (21)
    • TEMP (0)
Home
  • 분류 전체보기 (187)
    • Programming (109)
      • JAVA (15)
      • Javascript (0)
      • 데이터베이스 (8)
      • React (7)
      • 프레임워크 (1)
      • Spring (11)
      • 웹(Web) (4)
      • 운영체제 (5)
      • 서버&네트워크 (6)
      • 자료구조 (0)
      • 알고리즘 (1)
      • 형상관리 (0)
      • 에러노트 (35)
      • 개발 툴 (15)
      • TEMP. (1)
    • Project (0)
      • 트러블슈팅 (0)
    • Personal (1)
      • 리뷰 (1)
      • 업무 (0)
    • Course (0)
      • 모든 개발자를 위한 HTTP 웹 기본 지식 (1)
      • 스프링 핵심 원리 - 기본편 (51)
      • 자바 ORM 표준 JPA 프로그래밍 - 기본편 (21)
    • TEMP (0)
블로그 내 검색

기록

  • Programming/에러노트

    [GIT] 원격 저장소에 push가 안 될 때 (Updates were rejected because the remote contains work that you do / Updates were rejected because the tip of your current branch is behind)

    2022. 3. 10.

    by. 개발도비

    2021.5.10 작성

    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.

     

    git 원격저장소 repo에 push하려고 할 때 이런 오류가 뜬다

    로컬에 없는게 원격이 포함되어있다고... 이건 리드미 파일 때문이다 (README.md)
    원격저장소 생성할 때 리드미 파일을 생성했기 때문. 

     

    따라서 git pull로 먼저 받아와야 한다 

     

     

    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.

     

    이 오류도 마찬가지로 README파일 때문에 pull 먼저 받아와야 에러가 나지 않는다

     

     

    참고로 여기서 또 

    commit -> pull -> push : 에러남

    pull -> commit -> push : 성공! 

    이렇게 갈린다 

     

    GIT 쓸 때 순서도 참 중요하구나 다시 한 번 느낌

    파일 꼬이는거 한순간이다...

    'Programming > 에러노트' 카테고리의 다른 글

    [MySQL/Workbench] Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column. To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect.  (0) 2022.03.10
    [Spring Framework/Junit] java.lang.NoClassDefFoundError: javax/servlet/SessionCookieConfig / Missing artifact javax.servlet:servlet-api:jar:3.1.0  (0) 2022.03.10
    [Spring Framework/Junit] java.lang.IllegalStateException: Failed to load ApplicationContext  (0) 2022.03.10
    [Spring Framework/MySQL] Public Key Retrieval is not allowed  (0) 2022.03.10
    404 error : 폴더나 파일 이름은 공백이 없도록 지정하자  (0) 2022.03.09

    댓글

    관련글

    • [Spring Framework/Junit] java.lang.NoClassDefFoundError: javax/servlet/SessionCookieConfig / Missing artifact javax.servlet:servlet-api:jar:3.1.0 2022.03.10
    • [Spring Framework/Junit] java.lang.IllegalStateException: Failed to load ApplicationContext 2022.03.10
    • [Spring Framework/MySQL] Public Key Retrieval is not allowed 2022.03.10
    • 404 error : 폴더나 파일 이름은 공백이 없도록 지정하자 2022.03.09
    맨 위로
전체 글 보기
Tistory 로그인
Tistory 로그아웃
로그아웃 글쓰기 관리

Today

Total

Powered by ⓒ Kakao Corp.

Designed by Nana
블로그 이미지
개발도비

티스토리툴바