2010년 8월 18일 수요일

git for survival... -_-;;


1. remote repository 가져 오기
git clone ssh://user@some.server.com/subdir/project.git

2. remote list 보기
git remote -v

3. remote 상세 정보 확인 (*origin : remote repository clone하면 자동으로 지정 됨)
git remote show origin

4. master branch가 없는 경우 특정 branch가져 오기
git branch --track -b brLocalName origin/brRemoteName

5. 변경 사항 확인
git status

6. 수정사항 stage
git add [Changed files]

7. Commit (Local repository만 변경됨!!)
git commit

8. Remote repository update (branch의 default값은 master, remote-name도 생략 가능)
git push [remote-name] [branch]

9. 변경사항 rollback
git checkout [file_name]

10. remote의 branch로 update하기 (clone로 가져와서 remote설정이 되어 있는 경우)
git pull

댓글 없음:

댓글 쓰기