깃허브로 들어가서 repository를 생성하고 리모트 등록 후 푸시를 요청했다.
그런데 아래와 같은 에러가 발생하면서 제대로 동작하지 않았다.
➜ graphql git:(master) git push -u origin master
To https://github.com/teamhide/graphql_mysql.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/teamhide/graphql_mysql.git'
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.
찾아보니까 로컬이랑 리모트랑 동기화가 안되서 발생한 현상인듯하다.
내가 초반에 레포지토리를 생성하고 푸시를 했었는데,
그 이후에 리모트에서 README.md 파일을 생성하고 pull을 안해줘서 그런가보다.
아래의 명령어를 한번 실행해준다.
git pull origin master
그런 다음 다시 푸시해준다.
git push -u origin master
'Coding > 오류해결' 카테고리의 다른 글
awscli Library not loaded: @executable_path/ 오류 해결방법 (0) | 2019.02.11 |
---|---|
pipenv TypeError: 'module' object is not callable 오류 해결 (0) | 2018.10.19 |
'User' object has no attribute 'has_module_perms' 오류 해결 방법 (0) | 2018.06.29 |
The virtual environment was not created successfully because ensurepip is not available. 오류해결 (0) | 2018.02.02 |
Homebrew /usr/local/sbin is not writable. 오류해결 (0) | 2018.01.04 |