-
Git의 간단한 기능들GIT 2022. 1. 18. 17:44
여태 다룬 GIT의 기본적인 사용법 정리를 위해 할 예정 (사진 X)
Global Setup
config 설정 → 원하는 위치에 git init 해주면 됩니다.
git config --list : 현재 global 값을 보여줍니다.
git config --global user.name : gitHub 등의 유저 이름을 설정 합니다.
- git config -- global user.name "userName" : gitHub username 으로 설정
git config --global user.email : gitHub 등의 email 설정 합니다.
- git config -- global user.email "EmailAddr" : gitHub userEmail 로 설정
설정 삭제 방법
git config --unset user.name / git config --global --unset user.name
git config --unset user.email / git config --global --unset user.email
gitHub 인증 삭제
gitHub의 비밀번호 변경 또는 다른이유로 인증 오류 (fatal:authentication failed for) 발생시 인증 삭제
git config --unset credential.helper
core.autocrlf
윈도우에서는 \r\n , mac/linux 에선s \b 의 형태로 gitdp 올라가게 됩니다 그러므로 저장시에는 \n만 하여 가져와야할 경우가 생깁니다. 각 OS 에 맞는 설정법이 따로 있습니다.
Windows : git config --global core.autocrlf true
Mac : git config --global core.autocrlf input
alias
git status 처럼 긴(?) 문장일경우 이부분을 줄여쓰고 싶다면
git config --config global alias.st status → git st 이런식으로 짧게 사용이 가능합니다.
'GIT' 카테고리의 다른 글
Github push, pull, clone (0) 2022.01.13 merge conflict (0) 2022.01.06 Git merge (1) 2022.01.05 Git Reset & Reflog (0) 2022.01.04