μ μ₯μ λ§λ€κΈ°
λ²μ κ΄λ¦¬λ₯Ό νμ§ μλ λ‘컬 λλ ν 리
$ mkdir mygit
$ cd mygit
$ git init
κΈ°μ‘΄ Git μ μ₯μ ν΄λ‘
$ git clone <URL>


μν νμΈ
$ git status
μ€ν μ΄μ§
$ git add <FILE>
$ git add .
.gitignore νμΌ
#λ‘ μμνλ λΌμΈμ 무μνλ€.Stagedμ Unstaged μν λ³κ²½ λ΄μ© 보기
staged μνκ° μλ νμΌ λΉκ΅
$ git diff
컀λ°κ³Ό staged μν λΉκ΅
$ git diff --staged
λ³κ²½μ¬ν 컀λ°(λ²μ λ, μ€λ μ·)
$ git commit
κΈ°λ³Έ μλν° λ³κ²½
git config --global core.editor <EDITOR>
μΈλΌμΈ λ©μμ§
$ git commit -m <MESSAGE>
μ€ν μ΄μ§ λ° μΈλΌμΈ λ©μμ§
$ git commit -a -m <MESSAGE>
μ’μ Commit λ©μμ§
https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53
νμΌ μμ
$ rm <FILE>
μμ ν νμΌ Staged μν
$ git rm <FILE>
νμΌλͺ λ³κ²½
$ git mv <ORGION> <NEWFILE>
μ»€λ° νμ€ν 리/λ‘κ·Έ
$ git log
λ‘κ·Έ μΆλ ₯ λ³κ²½
git config --global core.pager 'less'
git config --global core.pager ''
$ git log --oneline