Git 개념
Git hub
초기 시작
구조
Working Directory (Local) → Staging area → Repository(Git) → 원격저장소
Staging area는 아직 repository에 올라가지 않았음으로 작업 내용을 바꿀 수 있음
Git 업로드 명령어
git config —list
git status
git add 파일명
git commit -m “텍스트”
git log
git reset —hard or mixed or soft HEAD^
git reset 해시값
git commit am “텍스트”
git revert 해시값
git remote add origin “저장소 주소”
git push origin “브랜치명"
git pull origin “브랜치명"
- 원격 저장소에 있는 작업물을 로컬에 저장시켜주면서 상태를 맞춤
Git Branch
branch
명령어
git branch “branch이름”
git checkout “변경하고 싶은 branch 이름”
git merge “합칠 branch 이름”
git branch -D “삭제할 branch이름”