Skip to main content
  1. Learn center
  2. Software Development
  3. Guides
  4. Git tutorial
  5. Git 명령 및 설정
  6. Git config 명령
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

Git config 명령


사용자 이름 및 이메일 설정

$ git config --global user.name <username>
$ git config --global user.email <mailaddress>

--global 옵션이 없으면 이 설정은 특정 저장소에만 적용됩니다.

색상 표시 출력

$ git config --global color.ui auto

명령의 별칭 설정

$ git config --global alias.<aliasname> <commandname>

버전 제어 추적에서 파일 제거

$ echo <filename> >> .gitignore

.gitignore 파일 아래에 파일 경로를 추가합니다. Git은 더 이상 해당 파일을 관리하지 않습니다. 이것이 작동하려면 .gitignore 파일을 커밋해야 합니다.

버전 제어에서 빈 디렉터리 추적

$ cd <dirname>
$ touch .gitkeep

Git은 빈 디렉터리를 추적하지 않습니다. 버전 제어에 추가하려면 해당 디렉터리에 파일을 배치해야 합니다. 사람들이 일반적으로 하는 일반적인 관행은 빈 디렉터리에 .gitkeep 파일을 추가하는 것입니다.

표시 설정

$ git config --global --list

프록시 서버에 대한 HTTP 연결 설정

.gitconfig 파일의 http 항목에 다음 설정을 추가합니다.

[http]
  proxy = <address of the proxy server>:<port of the proxy server>

다음 구성 명령을 사용하여 구성할 수도 있습니다.

$ git config --global http.proxy <address of the proxy server>:<port of the proxy server>

사용자 인증 프록시 서버에 대한 HTTP 연결 설정

.gitconfig 파일의 http 항목에 다음 설정을 추가합니다.

[http]
  proxy = http://<username>:<password>@<address of the proxy server>:<port of the proxy server>

다음 구성 명령을 사용하여 구성할 수도 있습니다.

$ git config --global http.proxy http://<username>:<password>@<address of the
  proxy server>:<port of the proxy server>

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life