github 기존 repo에 파일이나 폴더 업로드 하는 방법 - Songwooseok123/Study_Space GitHub Wiki

git clone "repo HTTPS"
  • 원하는 경로에서 터미널을 열어 위의 명령을 실행하면 git의 repo가 현재 경로에 생성됨

repo를 수정한 후 (파일 및 폴더 추가/삭제)

git add . 
git commit -m "블라"
git push origin main 

실행하면 repository가 업데이트 됨

error: failed to push some refs to 해결

원격 저장소와 로컬 저장소의 상태가 달라서 push가 되지 않는 것이므로 먼저 pull을 하고, push를 하면 된다!

$ git pull