본문 바로가기

Python_Beginer/GIT

(38)
[GIT]Git Stash - 수정중인 파일 감추기 및 되돌리기 $ git init st $ cd st $ vim f1.txt $ git add f1.txt $ git commit -m "f1" $ git log --all --graph --oneline $ vim f2.txt $ git add f2.txt $ git commit -m "f2" $ git log --all --graph --oneline $ vim f1.txt $ vim f2.txt $ git log --all --graph --oneline $ git status $ git stash $ git status $ git stash list $ git stash pop $ git log --all --graph --oneline 1. git statsh : 커밋하지 않은 수정 내용을 보관 2. stas..
[GIT]Branch - Branch Checkout and Reset $ git init test $ cd test $ vim c1.txt $ git add c1.txt $ git commit -m "c1" $ git log --all --graph --oneline $ git branch sub $ vim c2.txt $ git add c2.txt $ git commit -m "c2" $ git log --all --graph --oneline $ git checkout sub $ vim s1.txt $ git add s1.txt $ git commit -m "s1" $ git log --all --graph --oneline $ git log --oneline --branches $ git reset d653227 $ git log --all --graph --onel..
[GIT]Branch - Delete Branch(브랜치 삭제) $ git branch $ git log --all --graph --oneline $ git checkout master $ git branch -d o2 $ git log --all --graph --oneline 1. git branch -d 브랜치 : 병합된 브랜치 삭제 2. git branch -D 브랜치 : 병합되지 않은 브랜치 삭제
[GIT]3 way merge - P4Merge 1. Merge 작업 [ Confilict 상태 ] https://developer-ankiwoong.tistory.com/784 [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.. developer-ankiwoong.tistory.com $ cd document $ cd git $ git init confilict $ cd confilict $ vim work.txt $ git ad..
[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..