[0] 프로젝트 생성
vs에서 프로젝트 생성
Ctrl+`
[1] Git 초기화
# Git 초기화
git init
# 기본 브랜치를 main으로 지정
git branch -M main
[2] .gitignore 작성
# .gitignore 생성
@'
.vs/
bin/
obj/
*.user
*.suo
*.userprefs
*.VC.db
*.opendb
'@ | Out-File -Encoding utf8 .gitignore
[3] 첫 커밋
git add .
git commit -m "Initial WPF project commit"
[4] GitHub 원격 연결
git remote add origin 'url of repository'
[5] 원격과 동기화 후 푸시
- 원격 저장소가 완전히 비어있다면:
git push -u origin main
- 원격에 README 같은 초기 커밋이 있다면:
git pull --rebase origin main
git push -u origin main
[6] 이후 작업 사이클
git add .
git commit -m "설명 메시지"
git push
