-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Date
- 2023.12.20
Title
- 기존에 git에 push하면 master 브랜치로 push가 된다. 이를 main 으로 변경해서 push 하는 방법을 기록하였다.
Description
1) git init
2) git add .
3) git commit -m "Initial commit"
4) git remote add origin http://github.com/your-username/your-repository.git
5) git branch -M main
6) git push -u origin main
- Git 저장소를 초기화
- 프로젝트의 모든 파일을 스테이징 영역에 추가
- 변경 사항을 커밋
- Github 또는 사용하고 있는 Git 호스팅 서비스에서 새로운 저장소를 생성함. 저장소 URL을 복사.
복사한 원격 저장소 URL을 사용하여 로컬 저장소와 연결 - main 브랜치로 설정
- 원격 저장소에 푸시