메이킹 챌린지에서 가장 많이 부딪힌 부분은 GITHUB였다..
다른 분들은 다 잘되는데 나는 왜그럴까ㅠㅠ
결국 팀장님이 나의 코드를 복붙해주셔서 깃허브에 대신 올려주셨다 (감사합니다👍)
git push origin frontend-min(나의 브랜치) <-여기서 에러가 계속 터졌다
To https://github.com/bok/
! [rejected] frontend-min -> frontend-min (fetch first)
error: failed to push some refs to 'https://github.com/bok/
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 저장소와 나의 기록이 맞지 않아 생긴 것
merge가 필요하다고 한다
아래는 해결방법!
2.pull 하기
git pull origin frontend-min
C:\Users\Desktop\sparta\github\templates>git pull origin frontend-min
From https://github.com/bok
* branch frontend-min -> FETCH_HEAD
Already up to date.
~~~(중간 과정 add,commit,status 생략)
성공!
브랜치간 병합하는 것에 관하여 잘 알려주는 블로그가 있다 https://mylko72.gitbooks.io/git/content/branch/merge.html
나중에 또 에러뜨면 잘 살펴봐야지~