본문 바로가기

Python_Beginer

(145)
[GIT]2 way merge and 3 way merge [ 기본 구조 ] Base A B C D [ BASE 버전관리를 위해 Branch1 / Branch2를 생성 ] Branch1 Base Branch2 A A A B B B C C C D D D [ 각 Branch의 내용을 수정 ] Branch1 Base A A A H B B C C T H D T [ Branch1 와 Branch2 Merge ] [ 2 Way Merge ] Branch1 Branch2 Merge A A A H B Collision C T Collision H T Collision Conflict : 3개 존재 Branch1 와 Branch2를 비교해서 Merge Conflict 은 사용자가 직접 수정한다. [ Branch1 와 Branch2 Merge ] [ 3 Way Merge ] Br..
[GIT]Branch Merge - Merge same document locations(브랜치 병합 - 같은 문서 같은 위치 병합) $ cd documents $ cd git $ git init manual-4 $ vim work.txt $ git add work.txt $ git commit -m "work 1" $ git log --all --graph --oneline $ git branch o2 $ vim work.txt $ git commit -am "master work 2" $ git log --all --graph --oneline $ git checkout o2 $ vim work.txt $ git commit -am "o2 work 2" $ git log --all --graph --oneline $ git checkout master $ git merge o2 $ git status $ vim work.txt $ ..
[GIT]Branch Merge - Merge the same document to another location(브랜치 병합 - 같은 문서 다른 위치 병합) $ cd documents $ cd git $ git init manual-3 $ cd manual-3 $ vim work.txt $ git add work.txt $ git commit -m "work 1" $ git log --all --graph --oneline $ git branch o2 $ vim work.txt $ git commit -am "mater work 2" $ git log --all --graph --oneline $ git checkout o2 $ vim work.txt $ git commit -am "o2 work 2" $ git log --all --graph --oneline $ git checkout master $ git merge o2 $ git log --all -..
[GIT]Branch Merge - Merge different files(브런치 병합 - 서로 다른 파일 병합) 1. Branch Merge : 브랜치 작업을 마무리하고 기존 브랜치와 합치는 작업 $ cd documents $ cd git $ git init manual-2 $ cd manual-2 $ vim work.txt $ git add work.txt $ git commit -m "work 1" $ git log --all --graph --oneline $ git branch o2 $ vim master.txt $ git add master.txt $ git commit -m "master work 2" $ git log --all --graph --oneline $ git checkout o2 $ vim o2.txt $ git add o2.txt $ git commit -m "o2 work 2" $ gi..
[GIT]Branch Basic Usage(브런치 기본 사용법) $ vim work.txt $ vim apple.txt $ git add . $ git commit -m "apple content 4" $ git log --all --graph --oneline $ git checkout google $ vim work.txt $ vim google.txt $ git add . $ git commit -m "google content 4" $ git log --all --graph --oneline $ git checkout ms $ vim work.txt $ vim google.txt $ git add . $ git commit -m "ms content 4" $ git log --all --graph --oneline $ git log master..apple $..
[GIT]Branch Generation(브랜치 생성) 1. 기본 설정 $ mkdir manual $ cd manual $ git init $ ls -al $ vim work.txt $ git add work.txt $ git commit -m "work 1" $ git log $ vim work.txt $ git commit -am "work 2" $ vim work.txt $ git commit -am "work 3" $ git log 2. Branch : 커밋을 가르키는 포인터 / master 브랜치에서 뻗어 나오는 새 브랜치를 만드는 것 3. git branch : 브랜치를 확인 $ git branch 4. git branch 브랜치명 : 브랜치명을 생성 $ git branch $ git branch apple $ git branch $ git bra..
[GIT]Git Revert(커밋 삭제하지 않고 취소) $ vim rev.txt $ vim commit -am "R5" $ git log $ git revert 379d5e3ee5acc90208764e0bde93f13eb1e20a19 $ git log $ cat rev.txt 1. git revert 취소할 commit Hash : 커밋을 삭제하지 않고 취소
[GIT]Git Reset(특정 커밋으로 취소) $ vim rev.txt $ git add rev.txt $ git commit -m "R1" $ vim rev.txt $ git commit -a -m "R2" $ git log $ git reset --hard dfd4d8ea6273aa2237c57f383981791cd56a3b80 $ git log $ cat rev.txt 1. git reset : 특정 커밋으로 되돌리기 2. commit Hash = commit ID 3. commit Hash commit dfd4d8ea6273aa2237c57f383981791cd56a3b80