1. 레포지토리 default branch를 master에서 main으로 변경하는 법
git branch -m master main
git push -u origin main
2. 폴더에 새로 만든 레포지토리 주소 연결하는 방법
git remote add origin 깃허브주소
3. 이미 레포지토리가 존재하는 경우에 레포지토리 주소 변경하는 방법
git remote set-url origin 깃주소
4. 이미 push 된 파일에 .gitignore 적용
git rm -r --cached .
git add .
git commit -m "chore: apply .gitignore"
git push origin main
5. 만든 브랜치명 변경하기
git branch -m [OLD_BRANCH] [NEW_BRANCH]
728x90
'기타' 카테고리의 다른 글
gitlab에 있는 프로젝트 github에 가져오기 (0) | 2023.11.28 |
---|---|
spring 실행 시 'JAVA_HOME is set to an invalid directory' 오류 (0) | 2022.02.13 |
vscode 단축키 모음 (0) | 2022.02.09 |
python 가상환경 설정 및 실행 (window, cmd 기준) (0) | 2022.02.05 |