방향키 ⬆로 명령어 히스토리
복사 붙여넣기는 shift + insert 로 한다!!!
컨벤션 -약어 (ex. -m) --풀네임 (ex. --hard)
git config --global user.name JH
git config --global user.email wngml0708@gmail.com
git init
git add .
git commit -m "view complete"- 원격 저장소 연결
git remote add origin 주소
git remote -v
- 원격 저장소로
git push origin master
git log
git status
git clone 주소
- 형상 맞춤 (=원격지에서 local로 다운받기)
git pull origin master
- 기존 원격지 삭제
git remote rm origin
git reset --hard 해시
- 백업로그(reset한 뒤에 사라진 commit도 나온다)
git reflog
- 강제 push (—force) : local이 정상일경우
git push -f origin master
- 강제 pull : 원격저장소가 정상일경우
git pull -f origin master
Share article