Local Git 사용법
PC에 git 설치
http://git-scm.com
git bash 실행
git config --global user.name "이름"
git config --global user.email "이메일"
c:\
mkdir workspace
cd workspace
git init
로컬 저장소 초기화
vim hello.py
git status
깃 상태
git add hello.py
깃에서 파일 추적하도록 추가
git status
깃 상태
git commit
수정사항 커밋
git branch
브랜치 조회
git branch hotfix
hofix 브랜치 생성
git checkput (-b) hotfix
브랜치 이동
git commit -a
저장소 파일 모두 커밋
git checkout master
git merge hotfix
마스터에 hotfix를 병합
touch .gitignore
http://www.gitignore.io/ 에서 OS 별로 생성되는 내용을 복사해서 붙혀넣기
git add .gitignore
git commit -m ''added '.gitignore' file"
깃에서 추적이 불필요한 파일/폴더 무시
git checkout master
git merge hotfix
git commit -a -m "conflict resolved"
충동 발생시 vim으로 수정후 다시 커밋
git log --graph
git log --stat
댓글
댓글 쓰기