같이 일해야 하니까.. (협업)
분산버전관리sys
local
# 초기화
> git init
# 상태
> git status
# unstaged -> stage
> git add "example.py"
> git add .
# commit
> git commit -m "summary"
# commit 확인
>git log
# branch 확인
>git branch -v
# branch 생성
>git branch <branch_name>
# branch 전환
>git checkout <branch_name>
# brnach 병합
>git checkout master
>git merge <branch_name>
# branch 삭제
>git branch -d <branch_name>
remote (진짜 협업!)
# 연결
>git remote add <별칭=origin> <remote주소>
# remote 확인
> git remote -v
# push
> git push <remote_repo_name> <branch_name>
> git push origin week3/이현규
# remote branch_name을 main으로 변경 (github 정책상 유용)
> git branch -M main
> git push origin main
당장은 이거 잘하려고 깃 배움. 장기적으로는 업무 편의성(?)
1. Fork (내 github으로 가져오기 - 복사 -)
# local에 clone
> git clone <주소> <별칭=repo_name>
# branch 생성 & 전환
> git branch week3/이현규
> git checkout week3/이현규
2. Push
3. Pull