로컬 터미널에서 Github로 프로젝트 업로드

지니🧸·2023년 2월 24일
0

Git & Github

목록 보기
2/3

에러 1톤 해결한 김에 씀

프로젝트 업로드 방법

git init
git commit -m "initial commit"
git branch -M main
git remote add origin (git repository 링크)
git push -u origin main

에러 모음

1. 유저 Configuration (로그인)

에러는 다음과 같이 뜰 수 있음
1. fatal: 'for-you' does not appear to be a git repository fatal: Could not read from remote repository.
2. Please make sure you have the correct access rights and the repository exists.

해결 방법

git config user.name "git 유저명"

2. Fetch 에러

! [rejected] main -> main (fetch first)

해결 방법

git fetch

3. Non-fast-forward

! [rejected] main -> main (non-fast-forward)

 git push origin +main

profile
우당탕탕

0개의 댓글