clone
, push
, pull
clone
, pull
push
수락
push
가능push
& pull
동시 작업 불가(unsynchronize)
branch 갯수 1개
git clone
$ git clone https://github.com/Ryu-dot-line/collabo
$ git add file.md
$ git commit -m "commit msg"
$ git push origin master
git pull
$ git pull origin master
branch
동시 작업 가능
테스트 가능
master : 원본 branch
git branch
$ git branch
# commit 목록 있을 경우에만 출력됨
* master
git branch [브랜치명]
$ git branch Test
$ git branch
Test
* master # '*'이 있는 쪽이 현재 branch
* ~/branch (master) # '(master)' : 현재의 branch
git checkout [브랜치명]
$ git checkout Test
Switched to branch 'Test' # 'Test' branch로 이동
# branch 목록 및 현재의 branch 확인
$ git branch
* Test
master
* ~/branch (Test) # '(Test)' : 현재의 branch
$ git log
commit 0fabf23492ea0a2c7a1c88bb194f540d24697b29 (HEAD -> Test) # commit 당시의 branch
Author: Ryu <*@gmail.com>
Date: Wed Sep 16 14:48:40 2020 +0900
checkout
: 특정 버전으로 이동할 때도 쓰임git branch -d [브랜치명]
git merge [합칠 브랜치명]
대상 브랜치를 병합
★중요 : 주가 되는 브랜치로 이동★
master가 test를 병합 -> master merge Test
순서
주가 되는 branch로 이동(master로 이동) ★중요★
$ git checkout master
병합
$ git merge Test
옵션 : 테스트 branch 삭제 (테스트 branch 필요없을 경우)
$ git branch -d Test
git push [저장소명][브랜치명]
push
: branch 생성 및 pushpush
: push만$ git push origin Test
push
결과 확인compare & pull request
compare & pull request
Pull requests
pull
/ merge
) 시켜달라고 요청 (request
)일반적인 merge 권한
fork
순서
2. clone 후 push 가능
3. push 후 원본 사용자에게 pull request 요청 가능