Git
간단하게 설치하기
Linux
RPM 기반 패키지 시스템을 사용하는 Linux(RHEL, CentOS)
데비안 계열 Linux
MAC
http://mac.github.com
Windows
http://git-scm.com/download/win
RPM 기반 패키지 시스템을 사용하는 Linux(RHEL, CentOS)
$ sudo dnf install git-all
데비안 계열 Linux
$ sudo apt install git-all
MAC
http://mac.github.com
Windows
http://git-scm.com/download/win
Git 최초 설정
Git 설정 파일
설정 파일의 종류
- /etc/gitconfig: 시스템의 모든 사용자와 모든 저장소에 적용되는 설정
$ git config --system
- ~/.gitconfig, ~/.config/git/config: 특정 사용자(현재 사용자)에게만 적용되는 설정
$ git config --global
- .git/config: git 디렉토리 안에 존재. 특정 저장소에만 적용되는 설정.
.git/config > ~/.gitconfig, ~/.config/git/config > /etc/gitconfig
사용자 정보
커밋할 때마다 이 정보를 사용함. 한 번 커밋한 후에는 정보를 변경할 수 없음.
프로젝트마다 다른 이름과 이메일주소를 사용하고 싶을 때
$ git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com
프로젝트마다 다른 이름과 이메일주소를 사용하고 싶을 때
$ git config user.name "John Doe" $ git config user.email johndoe@example.com
설정 확인
$ git config --list
댓글 없음:
댓글 쓰기