Engineering/Git3 [Git] 03 commit 수정하기 git status repository의 상태 확인 현재 브랜치의 이름과 생성 / 변경 / 삭제된 파일 및 디렉토리 목록을 표시 commit하지 않은 변경사항 확인 git status git log local repository의 commit 히스토리 탐색 git log --oneline --all --graph —oneline: 각 commit을 요약해서 보여줌 —all: 모든 branch를 보여줌 -n: 탐색할 commit 히스토리의 개수를 지정 —graph: commit 히스토리를 그래프 형태로 보여줌 git reflog commit / rebase / reset 등의 히스토리 탐색 git reflog git reset 선택한 commit을 취소 git reset --hard —hard: reset.. 2023. 4. 4. [Git] 02 Git을 통한 협업 Create Branch branch: 독립적으로 어떤 작업을 진행하고 버전 관리를 할 수 있도록 하는 기능 branch 목록 보기 git branch 현재 위치해있는 branch에는 “*”를 붙여서 보여준다 새 branch 생성 git branch branch 삭제 git branch -d -d: delete main branch가 아닌 다른 branch를 push하고 싶을 때 origin(remote repository)에 feature/login이라는 이름의 새로운 branch를 올리겠다 git push --set-upstream origin feature/login Git Checkout git checkout branch / commit 전환 git checkout [branch 이름]: 해당 .. 2023. 4. 4. [Git] 01 Git Basic Git & Github Git: 소프트웨어 버전관리 시스템(VCS, Version Control System)의 한 종류 Git server & Git client git server 코드를 모아둔 중앙 서버 ex) github.com, gitlab 등 git client git server의 사본을 가진 로컬 환경 ex) git CLI(Command-line interface), Visual Studio Code에 내장되어 있는 git 등 Create Repository Repository repository: 파일이나 디렉토리(폴더)를 저장하는 장소 local repository: 자신의 컴퓨터에 있는 repository remote repository: 서버 등 네트워크에 있는 repository .. 2023. 4. 4. 이전 1 다음