https://git-scm.com/docs/gittutorial
git 공식 문서
https://chromewebstore.google.com/detail/octotree-github-code-tree/bkhaagjahfmjljalopjnoealnfndnagc
$ git config --list -> 설정된 목록 확인
$ git config --global core.editor "code"
$ git config --global core.editor "code" --wait"
$ git config --global user.name "자신의 닉네임"
$ git config --global user.email "자신의 이메일"
$ git config user.name -> 등록됐는지 이름 확인
$ git config user.email -> 등록됐는지 이메일 확인
-push 할 때 필요함.

Git을 사용할 때는 file status가 있다.

staging area에서 .git directory보낼 때 commit 한다
추적이 가능하다.
로컬레포에서 웹 레포로 보낼 때 push
$ git config --global core.autocrlf input
-> two-way-merge 나 three-way-merge 할 때 충돌이 발생하면 에디터로 확인한다.
-> 그래서 전용 에디터를 vscode로 한다.
로컬에서 만든 레포를 웹레포에 올리기 push
웹레포에서 -> 로컬 레포로 내리기 pull
$ mkdir 폴더명
$ cd 폴더명
$ git init -> master branch가 생긴다.
$ git config --global alias.hist "log --graph --all --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(white)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --date=short"
$ git config -e -> vscode에서 config창이 열린다.
[core]
editor = code --wait
autocrlf = true
[user]
name = 깃이름
email = 본인메일
[pull]
rebase = false
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[alias]
st = status
hist = log --graph --all --pretty=format:'%C(yellow)[%ad]%C(reset) %C(green)[%h]%C(reset) | %C(white)%s %C(bold red){{%an}}%C(reset) %C(blue)%d%C(reset)' --date=short
[mergetool]
keepBackup = false




$ echo a > a.txt -> Untracked 상태이다.
$ git add a.txt -> Staging Area로 이동한다
$ git rm --cached a.txt -> 다시 Untracked 상태로 된다.
$ git commit -m "메시지를 입력하세요" -> .git directory로 로컬 git으로 이동한다
$ git hist
$ git push
git checkout -b 브랜치이름 -> branch가 만들어지고 해당 브랜치로 이동한다.
branch 이동 명령어
git checkout 브랜치이름
git switch 브랜치이름