git config --global user.name [깃허브 가입 시 이름]
git config --global user.email [깃허브 가입 시 이메일]
git clone http://github.com/[내 이름]/[저장소 명].git
git remote remove origin
git remote add origin https://github.com/[계정]/[레포지토리]
git status
git add [파일이름]
현재 디렉토리
git add .
전체 디렉토리
git add -A
git reset HEAD [file]
git commit -m ["커밋 로그를 작성해주세요"]
취소할 commit 번호
git log --oneline
commit을 취소하고 해당 파일들은 staged 상태로 워킹 디렉터리에 보존
git reset --soft [HEAD]
commit을 취소하고 해당 파일들은 unstaged 상태로 워킹 디렉터리에 보존
git reset --mixed [HEAD]
사용주의
commit을 취소하고 해당 파일들은 unstaged 상태로 워킹 디렉터리에서 삭제
$ git reset --hard [HEAD]
git push origin main
git checkout [branch]
git merge [branch]
git remote update
git fetch
git checkout -f main