How to settings git, init, cloning, add, commit, remove, branch, reset, and update sub branch from master branch
git config --global user.name "아이디"
git config --global user.email "이메일"
git clone <:path>
git init
git remote -v
git remote add <remote:name> <:path>
git remote set-url <remote:name> <:path>
git remote remove <remote:name>
git add <file>
git reset HEAD <file>
git commit -m "message"
git commit --amend "message" (option: --no-edit)
git push (-f) <remote:path|name> <branch:name>
git branch
git branch <branch:name>
git branch -d <branch:name>
git checkout <branch:name>
git checkout -b <branch:name>
git cherry-pick oldest-commit^..latest-commit
git merge <branch:name>
(merge후에 push 필수)
git rebase <branch:name>
(rebase후에 commit지점 Applying 하고 merge 수행)
git fetch <remote:path|name> <branch:name>
git pull <remote:path|name> <branch:name>
rm -r .git
git remote remove <remote:name>
git reset HEAD^
git reset --soft HEAD^
git reset --hard HEAD^
git rm -r --cached .
git add .
git commit -m "적용할 커밋 메시지"
soft : 현재 인덱스, 워킹 트리를 유지한 채로 HEAD를 변경
mixed : default 옵션. 인덱스는 취소한채로 워킹트리만 그대로
hard : 인덱스와 워킹트리 변화를 모두 제거하고 HEAD를 변경
@: 1.8.4부터 도입된 HEAD의 동의어
^: 한 단계 이전
~n: n번 이전
ORIG_HEAD: 하는 것은 이전에 작업한 곳의 HEAD