Github 관련 정리

pnlkc·2022년 5월 31일
0
post-thumbnail

처음 올리는법

git init
git add .
git commit -m "first commit"
git remote add origin 주소
git push origin master

업데이트 하는 법

git add .
git commit -m "second commit"
git push origin master

오류 해결법

1. Remote origin already exists

git remote remove origin

기존에 연결되어 있는 원격 저장소와의 연결을 끊어주면 됨

2. ! [rejected] master -> master (fetch first) error: failed to push some refs to

git pull --rebase origin master
git push origin master

원인은 깃의 원격 저장소와 현재 로컬 저장소가 동기화되어있지 않기 때문 해결방법도 동기화 시켜주면 간단하게 해결됨

profile
안드로이드 개발 공부 블로그

0개의 댓글

관련 채용 정보