본문 바로가기
Tech-BigData

COURSERA - The Data Scientist’s Toolbox - 03 : Git Basic Command

by redcrow 2015. 1. 25.

1. Git에서의 Command에 따른 데이터 이동


[출처]

http://blog.osteele.com/posts/2008/05/my-git-workflow/

http://gitready.com/beginner/2009/01/21/pushing-and-pulling.html


2. Git Basic Command


1) Adding


- git add . :  모든파일 add

- git add -u : 이름이 변경되거나 삭제된 파일의 변경까지 tracking 하여 add

- git add -A : 위 두가지 모두 처리


Commit하기전에는 Add 필수


2) Committing : Local Repo에 반영


- git commit -m "message"


3) Pushing : GitHub에 반영

- git push


4) Branches : 여러사람이 함께 Repository를 공유하고 있고 하나의 버전을 변경하고 싶지 않을 경우 Branch

- git checkout -b branchname : branch 생성

- git branch : 현재 branch type 보기

- git checkout master : master branch type으로 변경


5) Pull request

다른사람의 repository를 pork 했거나 여러개의 branch를 갖고 있을 경우 변경사항을 다른 사람의 repository나 branch로 merge하려고할때 사용


[참고]

1. Git Documentation  http://git-scm.com/doc

2. Github Help          https://help.github.com


댓글