Git advanced.

springBoot gradle 2016. 9. 12. 15:21

git기본은: http://yongary.tistory.com/151




http://learngitbranching.js.org/   graphical 공부site


  - git의 commit은 매우 가볍다. 이전버전과 차이점 delta만 관리. 

  - local 관리버전을 master라고 부름.. (remote가 origin 인 듯)

  - branch는 단지 commit으로의 pointer이다. (storage/memory overhead없음)

git branch branchName해서 만들고 + git checkout branchName 한 다음에 git commit해야 함. 

: or  git checkout -b branchName 하면 branch를 만들면서 checkOut도 같이 함.

  - git merge 방법:

: git branch bugFix

:    git checkout bugFix

:    수정후 git commit

: git checkout master

:    git commit  (이 단계가 왜 필요한지?? 연구 중)

:    git merge bugFix

   

  - git rebase : 패러랠 branch작업을 sequential한 history로 변환시켜 줌. (대단하네요)

              현재 bugFix* checkout된 상태에서, 

: git rebase master 하면 sequential로 되고 그 후,  (현재 bugFix*가 계속유지됨.)

: git rebase bugFix   (master*가 current로 바뀜. sequential상에서의 merge효과가 생김. ) 

      


           

<기억할 명령어>

git checkout FileName  : 파일 하나 Revert

git checkout -- FileName  :  파일 하나 Revert from -- branch. (need test)  REF



git branch -v :  branch상태 확인가능.. 로컬이 앞서가면(commit 이 많으면 ahead 2 이런식으로 나옴)  : REF

==>  $ git fetch --all; git branch -w   이렇게 사용해야 최신 정보가 비교가 됨.



Posted by yongary
,