git push를 했는데 오류도 안나고 아무런 현상이 일어나지 않았다.
오류가 나면 오류사항 검색이라도 해보지 답답했는데 구글링하다가 알게 된 해결방안.
git에 올릴 파일에 cmd를 켜서 동일하게 git push -u origin main까지 진행한다. 1번 2번이 뜨면 1 치고 git 아이디 비밀번호 입력하면 push가 잘 된다. 이후에는 git bash에서도 push가 잘된다.
출처: https://www.codeit.kr/community/threads/28278
이후에도
hint: Updates were rejected because the remote contains work that you ~
오류가 떠서 다시 구글링을 해보니
git pull origin main 을 하라고 한다.
하지만 이 이후에도
fatal: refusing to merge unrelated histories 오류가 떠서
git pull origin main --allow-unrelated-histories 를 입력하고 git push까지 진행하니 잘 됐다!
출처: https://soy3on.tistory.com/42