! [rejected] main -> main (fetch first)
error: failed to push some refs to 'https://github.com/Canyi0304/NextJS_OpenAIAPI.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.
이럴 경우 github에 있는 정보와 git 로컬에 있는 정보가 매칭이 안돼서 먼저
git pull origin 브런치이름
git push origin 브런치이름
github에 브런치에 있는 정보를 pull로 당겨와서 push