공부하는 안경딸기
[git] hint: Updates were rejected because the remote contains work that you do 본문
TanTanBody
[git] hint: Updates were rejected because the remote contains work that you do
안경딸기 2021. 9. 30. 13:20git을 ide에 묶어서(?) 사용하면 간혹 가다 hint: Updates were rejected because the remote contains work that you do와 같은 에러를 만난다.(push error) 처음에는 엄청 당황해서 원인을 찾는데 오래 걸렸는데 이제는 보면 익숙한 이 문구가 뭔지 적어보려고 한다.
원인
내가 항상 만나는 원인은 <github에서 README 파일을 수정한 경우>이다.
추가적으로 github에 repository를 만들 때 README 파일을 같이 생성해도 발생한다고 한다.
해결 방법
git bash를 사용해서 아래 두 줄을 입력하면 해결된다.
git pull origin master
git push origin master
pull 명령어를 입력하면 나만 그런지는 모르겠는데 메모장이 뜬다. 처음에는 당황했는데 안에 글을 읽어보면 comment 남기라는 거여서 한글 말고 영어로 comment 입력해서 닫으면 해결된다.
'TanTanBody' 카테고리의 다른 글
[MySQL] illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,IMPLICIT) for operation '=' (0) | 2021.10.07 |
---|---|
[Retrofit2] retrofit response 가 null, 0 (0) | 2021.10.04 |
[Spring Boot] Mapper method ... has an unsupported return type: (0) | 2021.09.29 |
[MyBatis] 헛짓한 썰 풀기 (0) | 2021.09.26 |
[DB] Database 구성 (0) | 2021.09.25 |
Comments