728x90
1. 프로젝트 깃 초기화
git init
2. .gitignore 파일 추가 (추가 안하면 .vs/ 때문에 Permission denied 에러가 난다)
touch .gitignore
3. .gitignore 파일에 배포하지 않을 파일/폴더 정의
# Visual Studio 관련 파일 무시
.vs/
*.user
*.suo
*.dbmdl
*.userosscache
*.sln.docstates
# 빌드 산출물 무시
bin/
obj/
Debug/
Release/
# OS별 임시 파일
.DS_Store
Thumbs.db
4. 현재 작성한 프로젝트 스테이징
git add -A
5. 스테이징된 파일들 배포하기 위해 commit
git commit -m "initial commit"
6. 깃 허브 레포 연결하고 master 브랜치로 push
git remote add origin https://github.com/-.git //레포 연결
git branch -M master //브랜치명 master 강제 변경
git push -u origin master //원격 master 브랜치 연결하고 push