Github 사용설명서

Hunter_Joe·2023년 3월 24일
0

git

목록 보기
1/1
post-thumbnail

Git 버전 확인

git -version 
git - v

Git 연결

git init
git add .
git commit -m "first commit"
git branch -M main
git remote add origin https://(본인 github주소)
git push -u origin main

기존 git repository에 추가

git add . 
git commit -m "[수정 커밋 제목]"
git push

Git 삭제 명령어(mac os)

git -rf .git

Git cache 삭제 명렁어

git rm -rf --cached

Commit 기록 확인

git log --oneline

Git hard option

git reset --hard [commit number] //되도록 안쓰는 것을 추천 (revert 추천)

git push -f origin main // 강제 푸시 명령어

Git Clone

git clone [본인 주소]

Branch 생성 & Push

git branch -M [생성하고싶은 branch 이름]

git add.

git commit -m "[커밋 제목]"

git push -u origin "[branch 이름]"

Branch이동

git checkout {branch명}

profile
hunting season

0개의 댓글