1. Git 설치 & 초기 Setting
2. Local -> Directory 생성
3. Github -> Repository 생성
[ Git Bash ] 연동할 Directory에서
$ git config --global user.name {yourName}
$ git config --global user.email {yourEmail}
(확인)
$ git config user.name
[ Result ] -> yourName
$ git config user.email
[ Result ] yourEmail
$ git init
[ RESULT ] Initialized empty Git repository in [Your Directory Address]/.git/
$ git add .
$ git commit -m "message"
$ git remote add origin [yourGithubAddress]
ex) git remote add origin https://github.com/yourName/yourRepositoryName.git
[ RESULT ] 아무 것도 출력되지 않습니다.
(확인)
$ git remote -v
$ git push --set-upstream origin main
(첫 push에만 이렇게 작성하고, 이후에는 '$ git push' 만 작성하시면 됩니다.
fatal: protocol '?[200~https' is not supported
해당 문제가 발생한다면, github의 주소를 웹상에서 복사하고 Git Bash에 붙여넣기 함으로써
주소 앞에 ' ^[[200~ ' 이라는 문자가 붙여져서 생기는 문제였다.
$ git remote remove origin
$ git remote add origin https://github.com/...
이 문자열을 삭제하고 다시 하면 해결된다
* 게시글에 오류가 있거나, 보충이 필요한 부분은 댓글에 작성해주시면 정말 감사하겠습니다!