Gwnduke's 2016. 6. 4. 13:38

git config --global user.name "Gwan-duk Kim"

git config --global user.email "your@email.com"


~/.gitconfig 의 내용이 업데이트 됨


- color.ui 설정

git config --global color.ui auto


- git config 설정 보기

git config --list





ssh-keygen -t rsa -C "your@email.com"


~/.ssh

id_rsa: 비밀키

id_rsa.pub: 공개키


github에 공개키 등록 -> 비밀키를 통해 접근



git config --global core.editor "\"에디터경로\""



git log --pretty=short



git log 파일명


commit에서 변경된 내용 확인

git log -p [파일명]




working tree 와 stage diff

git diff


working tree 와 최신commit diff

git diff HEAD


브랜치 시각적 확인

git log --graph




git reset --hard 복원지점해쉬


모든 브랜치의 커밋로그 확인

git reflog 



커밋 메시지 수정

git commit --ament



git rebase -i




git push -u origin master

-u옵션을 사용하면 upstream이 origin master 브랜치로 설정되어, git pull시 자동으로 받아옴