Git

[git] git 명령어

sian han 2022. 12. 7. 21:36

인텔리제이에서 GUI 로만 pull / push / commit 을 하다가 vscode 넘어와서 한참 헤맸다.

vscode 는 GUI 사용이 너무 불편해서 그냥 git 으로 컨트롤 하기로 했다.

 

※ 프로젝트 최초 커밋 by 터미널

▶ github 최초 커밋

git init
git add .
git commit -m 'initial commit'
git remote add origin {원격저장소}
git push -u origin main

 

 

▶ != 최초커밋

git add .
git commit -m '{커밋메세지}'
git push
git push

 

 

 

 

※ git config 

로그인 정보 확인

git config --list

 

정보삭제

git config --unset user.name
git config --unset user.email

//global
git config --unset --global user.name
git config --unset --global user.email

 

Re-set

git config user.name "김가나"
git config user.email "helloWorld@java.com"