저장소 만들기 저장소 만들기 저장소 만드는 두 가지 방법 1. 기존에 있는 프로젝트를 Git 저장소로 만듬 2. 다른 서버에 있는 저장소를 Clone 1. 기존에 있는 프로젝트를 Git 저장소로 만듬 git init .git (저장소를 이루는 뼈대가 되는 파일들) 하위 디렉토리 만듬 git add . git add .c git commit -m 'init version' Git에 파일 추가 및 최초 커밋 2. 다른 서버에 있는 저장소를 Clone git clone git://github.com/schacon/grit.git mygit mygit이라는 디렉토리를 만들고 .git 디렉토리를 만듬 그리고 저장소의 데이터를 모두 가져오고 최신 버전을 checkout
환경 설정 환경 설정 apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev http://git-scm.com/download tar -zxf git-1.7.2.2.tar.gz cd git-1.7.2.2 make prefix=/usr/local all sudo make prefix=/usr/local install git clone git://git.kernel.org/pub/scm/git/git.git apt-get install git
Basic Basic Git Checksum SHA-1 Hash를 사용하여 만듬. 40글자의 16진수 문자열 Change-id라고도 불림 세 가지 상태 Staged -> Modified -> Commited 세가지 단계 Working directory -> Staging area -> Git directory (repository)
Alias Alias 일종의 단축키 아래에 작성되면 로그인할 때 자동으로 적용됨 ~/.bashrc : 계정의 shall에 기본 설정 /etc/profile : 모든 사용자의 기본 설정 만약 변경하고 바로 적용되길 원한다면 $ source ~/.bashrc 를 입력 $ alias 현재 alias 내역 확인 예제 alias rm='rm -rf' alias win='mount -t smbfs //192.168.0.1/data /media/samba' alias web='/etc/init.d/httpd' web {start|stop|restart}
Git and Git utils Install Git and Git utils Install apt-get update apt-get install git apt-get install qgit gitk git-svn Add my Info git config --global user.name "byounghong.lim" git config --global user.email byounghonglim@gmail.com Change Color of Git git config --global color.branch auto git config --global color.diff auto git config --global color.interactive auto git config --global color.status auto