! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/~
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushinghint: to the same ref.
You may want to first integrate the remote changeshint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
원인은 깃의 원격 저장소와 현재 로컬 저장소가 동기화되어있지 않기때문이라고 함.
해결방법은 동기화 시켜주니 해결됐다.
1. git pull origin master(또는 main)
2. git push origin master(main)
'프로그래밍 > 문제' 카테고리의 다른 글
ImportError: cannot import name 'url' from 'django.conf.urls' (0) | 2023.01.31 |
---|---|
인텔리제이(Intellij) 실행 오류 (0) | 2023.01.14 |
Git push 에러 (fatal : refusing to merge unrelated histories) (0) | 2022.09.30 |
github 리모트 리포지토리 변경하기 (0) | 2022.04.26 |
gith push 에러 (non-fast-forward) (0) | 2022.04.18 |