git 연결
git config --global user.name <깃허브 이름>
git config --global user.email <깃허브 메일>
(보통 설정되어 있음. 확인은 아래와 같이)
git config --global user.name
git config --global user.email
기본 브랜치명 변경하기
git config --global init.defaultBranch main
git 시작
git init
git add .
git commit -m "메세지"
깃허브 레퍼지토리
(README.md를 생성하지 않았을 경우)
git remote add origin https://github.com/<user_name>/<repo_name>.git
git branch -M main
git push -u origin main
(이 부분은 repo 생성 시 두번째에서 확인 가능)
+)403 Premission Error
해결방법 : keychain > github.com검색 (없으면 생성) > 암호 변경 > github token (권한 부여 안하면 안됨)