IT & Dev.

[git] 설정파일 알아보기

시고르빙봉 2023. 11. 27. 22:41
728x90
반응형

깃을 처음 설치하고 가장 먼저 설정하는 것 중에 깃에서 사용할 사용자 이름과 이메일이다.

전체 로컬 시스템에서 사용하기 위해 다음과 같이 입력한다.

> git config --global user.name "이름"

> git config --global user.email 이메일주소

깃의 config 명령를 이용하여 깃에 대한 설정을 추가/수정할 수 있다.

깃의 모든 설정사항을 확인하기 위해서는 다음과 같이 입력하면

> git config --global -e

개별적으로 설정한 값들을 포함한 모든 설정 사항을 확인 할 수 있다.

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	precomposeunicode = true
	editor = code --wait
	autocrlf = input
[user]
	name = BingBong
	email = dufentldhqns@gmail.com
[diff]
	tool = vscode
[difftool "vscode"]
	cmd = "code --wait -diff $LOCAL $REMOTE"

[init]
	defaultBranch = main
[alias]
	hist = log --graph --all --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(white)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --date=short

 

깃 설정 파일에 추가할 수 있는 사항은 아래 경로에서 확인 가능하다.

https://git-scm.com/docs/git-config

 

728x90
반응형