minzero31 / MadCamp-1week-Android

0 stars 0 forks source link

[Error] 안드로이드 깃 push 오류 #5

Closed minzero31 closed 2 days ago

minzero31 commented 6 days ago

오류 메세지 : $ git push -u origin main To https://github.com/minzero31/MadCamp-1week-Android.git ! [rejected] main -> main (non-fast-forward) error: failed to push some refs to 'https://github.com/minzero31/MadCamp-1week-Android.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. If you want to integrate the remote changes, hint: use 'git pull' before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. 해결 방법 :

hado68 commented 6 days ago

"git pull --rebase origin main" 를 통해 원격 저장소 변경사항을 로컬에 rebase했다. "git push -u origin main"를 이용해 다시 변경사항을 push 하였다

minzero31 commented 6 days ago

문제 상황 2 : 안드로이드 내에서의 git branch를 master에서 main으로 변경하지 못해서 commit & push가 되지 않음. 문제 상황 3 : git bash에서 안드로이드 스튜디오 프로젝트를 push하려고 했을 때 프로젝트 내의 모든 폴더와 파일이 push 되지 않고 일부만 push되는 문제 발생.

minzero31 commented 5 days ago

문제 상황 4 : 새로운 branch를 생성해서 initial commit & push를 하려고 하는데 오류 발생. 이미 add도 진행한 상황이고 branch의 연결도 원격과 로컬이 잘 되어있는 상황임. image

해결 방법 : 원격 github 페이지가 아니라 git bash에서 브랜치를 생성하고 push하면 되는 것 같음. image