GitHub
replit 코드 깃허브에 업로드하기 (init부터 push까지)
내일은개발천재🎵
2021. 4. 8. 23:28
🔎 리플릿과 깃허브 연동, 파일 만들기 등은 zest1923.tistory.com/25 에서 확인해주세요
(코딩테스트 연습문제를 깃에 업로드 하며 필요한 것만 작성되어있습니다)
0. 가정

- 현재 replit에는 python1.py와 python2.py가 존재하고, gitHub에는 repository 만 존재하는 상황입니다.
- 저는 algorithm 폴더 자체를 깃에 업로드 할 것입니다.
1. Git init, add, commit, push ( 맨 처음에만 )





깃허브의 새로운 인증 방식이 도입되었습니다(토큰) pw에 토큰값을 적어주어야합니다.
[GitHub] 새로운 인증방법 도입 (push 안될 때)
갑자기 git push, commit가 안되는 상황을 겪었어요. 깃허브에서 ID/PW 인증을 폐지하고, 토큰 인증 방식을 채택했기 때문입니다. Basic authentication using a password to Git is deprecated and will soon no..
zest1923.tistory.com
해당 포스트 참고해주세요
2. 이후 python3.py와 python4.py를 업로드 하고싶을 때

📌 총 정리
1. replit에 처음으로 프로젝트를 만들었을 때
git init # 저장소 등록 git add . # 파일 등록 ( 직접 파일 명을 입력해도 됩니다. ) git commit -m "commit message" # 어떤 커밋인지 잘 적어 놓는 습관을 들이는 것이 좋습니다. git push -u origin master # 커밋한 것들을 GitHub에 업로드 합니다.
- 이후 Git ID/ PW 를 적으면 됩니다.
2. 이후부터는 git init을 제외한, 3줄만 작성합니다.
git add . # 또는 git add python3.py 등으로 입력해도 됩니다. git commit -m "commit message" # git history에 등록 git push -u origin master # commit된 파일을 업로드
< 관련 포스팅 >
✏️ zest1923.tistory.com/6 Git의 명령어
✏️ zest1923.tistory.com/5 Git의 개념