git config --global user.name username
git config --global user.email email
LF만 사용
git config --global core.autocrlf input
git config --global core.editor < editor >
git config --list
git config < key >
Local Repository는 Git이 관리하는 3가지 단계로 구성되어 있음

Workspace 생성
mkdir git_ws
Workspace로 이동한 뒤 Working Directory 생성
cd git_ws
mkdir test_project
폴더에서 Git을 초기화하는 명령어를 사용하면 해당 폴더를 Git이 관리하기 시작
git init
생성한 폴더로 이동하여 Git init을 실행하면 Repository가 생성됨
git_ws % cd test_project
test_project % git init
Initialized empty Git repository in /Users/nomaefg/.../git_ws/.git/
-> .git폴더가 생성된 것을 확인
test_project % touch test.txt
ls
test.txt
Git에 존재하는 파일 확인
git status
Working Directory에서 변경된 파일을 Index(stage)에 추가
git add < filename >
Index(stage)에 추가된 변경사항을 HEAD에 반영(확정)
git commit -m "commit에 대한 설명" < filename >
Local Repository에 Remote Repository 등록
git remote add origin https://github.com.< repository >.git
Remote Repository 정보확인
git remote -v
Local Repository (HEAD)에 반영된 변경내용을 Remote Repository에도 반영하기 위해서는 Git Push를 사용
git push origin < branchname >
test_project% git push origin master
-> Remote Repository 페이지에서 새로고침하면 Push된 파일이 보임
Remote Repository의 내용에 맞춰 Local Repository를 갱신하려면 Git Pull 사용
git pull origin < branchname >
Default Branch 설정
Local Repository를 생성하지 않은 상태에서 Git clone 명령을 사용하여 Remote Repository를 Local에 복제할 수 있음
Git clone
Branch 조회 (Local Branch)
git branch
Branch 조회 (Remote Branch)
git branch -r
Branch 조회 (Local + Remote)
git branch -a
Branch 생성
git branch < branchname >
git push origin < branchname >
Branch 이동
git checkout < branchname>
Branch 생성 + 이동
git checkout -b < branchname >
Branch 삭제 (Local Repository)
git branch -d < branchname >
Branch 삭제 (Remote Repository)
git push origin --delete < branchname >
--wait 옵션은 command line으로 VSCode를 실행시켰을 경우,
VSCode 인스턴스를 닫을 때까지 command를 대기
git config --global core.editor < editorname > --wait
git configuration 파일 열기
git config --global -e
Git Diff 설정 추가
[diff]
tool = vscode
[difftool "vscode"]
cmd = "code --wait --diff $LOCAL $REMOTE"
Git Diff - Local Branch간 비교
git diff < branch1 > < branch2 >
Git Diff - Commit간 비교
git diff < commithash > < commithash >
Git Diff - 마지막 Commit과 이전 Commit 비교
git diff HEAD HEAD^
Git Diff - 마지막 Commit과 현재 수정사항 확인
git diff HEAD
Git Diff - Local and Remote 간 비교
git diff < branch > origin/< branch2 >
특정 버전 (Commit)에 Tag를 달아놓을 필요가 있을 때 사용 (예 - 버전 릴리즈)
git tag 생성
현재 버전에 tag 달기
git tag < tagname >
특정 버전에 tag 달기
git tag < tagname > < commithash >
tag를 Remote Repository에 Push
git push origin < tagname >
git tag 목록 보기
git tag
git tag 상세 정보
git show < tagname >
git tag 삭제
git tag --delete < tagname >
git push --delete origin < tagname >
This is H1
==========
This is H2
----------
# This is H1
## This is H2
### This is H3
#### This is H4
##### This is H5
###### This is H6
> This is a first blockquote
>> This is a second blockquote
>>> This is a third blockquote
This is a first blockquote
This is a second blockquote
This is a third blockquote
<pre><code>print('this is readme file.')</code></pre>
print('this is readme file.')