[Git] Git 기본 명령어 정리 1
Updated:
Git 기본 명령어를 정리한 첫번째 글입니다.
Git 명령어는 git [명령어 이름]
형태로 구성됩니다.
1. 저장소 생성
git init
: 로컬 git 저장소(repository) 생성
2. config 설정
git config --list
: 저장소 설정 전체 출력-
git config --get [설정항목]
: 일부 설정항목만 출력(ex : git config –get user.name) git config user.name "[Your Name]"
: 사용자 이름 설정git config user.name
: 사용자 이름 확인git config --global user.name "[Your Name]"
: 전체 저장소에 사용자 이름 설정-
git config --global user.name
: 전체 저장소의 사용자 이름 확인 git config user.email [you@example.com]
: 사용자 이메일 설정git config user.email
: 사용자 이메일 확인git config --global user.email [you@example.com]
: 전체 저장소에 사용자 이메일 설정git config --global user.email
: 전체 저장소의 사용자 이메일 확인
3. 도움말
git help -a
: 모든 명령어에 대한 도움말 확인git help [명령어]
: 명령어에 대한 도움말 확인git [명령어] -h
: 명령어에 대한 간단한 옵션 확인
Leave a comment