Development

[study] git

mefd 2023. 1. 14. 15:43
728x90

# 준비 : Git 다운로드

# git remote -v : 저장소 확인

 

1. git에 업로드할 폴더로 이동 > 우클릭 > Git Bash Here

 

2. git config --global user.name "자신의 깃허브 이름"
3. git config --global user.email "자신의 깃허브 이메일"

 

4. git remote add origin https://github.com/자신의 깃허브 이름/레포지토리이름.git
(##오류 >> git remote remove origin 후 다시 4 진행 )

5. git add *

6. git commit -m "commit 할 메모"

7. git push origin master (또는 main)

 

8. 수정하고 업로드 하기 이전에 git pull origin main 
Already up to date 확인 후 >> 5 실행

 

##git push 오류
--오류코드
hint : Updates were rejected because the remote contains worl that you do
...
hint : (e.g. 'git pull ...')

해결)  git pull origin master(또는 main)
입력 후 다시 push 실행

728x90