source 관리 tool인 git에 관한 linux console용 command를 정리합니다.
git 기본 명령
$git clone <remote repository address>
- git의 remote repository address의 내용을 clone
$git pull
- git의 최근 내용으로 반영
$git add <file>
- git에 변경된 file 을 추가(변경 내용을 Staged 상태로 만듦)
$git rm <file>
- git에 변경된 file 을 삭제(변경 내용을 Staged 상태로 만듦)
$git commit -a -m <message>
-m 변경된 file들에 관한 내용을 <message> 내용으로 commit
-a 옵션 : 변경된 file들에 관한 내용을 Staging Area 에 자동으로 추가한다.
$git push origin master
- master(현재 branch)의 내용을 origin(원격 저장소)에 반영
$git fetch --all
$git reset --hard origin/master
$git pull origin master
- master(현재 branch)에 origin(원격 저장소)내용을 반영
git 계정 관련 명령
$git config credential.helper 'cache --timeout=3600'
- timeout=3600 은 3600초(1시간)를 의미
$git config credential.helper store
- 해당 directory에 반영구적으로 인증 정보를 저장
$git config credential.helper store --global
- 해당 directory 이외 모든 directory에 인증 정보를 적용
'TOOL > 개발툴' 카테고리의 다른 글
TOOL - vim (0) | 2021.02.11 |
---|