작업이력을 확인해보자 !
- 작업한 것에 대한 버전과 브랜치들을 텍스트가 아닌 시각적으로 보기 가능
- VSCode - extension - Git Graph 검색 후 설치
- 아래 그림 클릭시 그래프 확인 가능!
실습환경 만들기
- Remote Repository 생성
- log_project 생성
- Local Repository에 Clone
git clone https:<username>:<token>@주소.git
- cat : cat 파일명을 하면 내용이 출력되고, >(꺽쇠)를 사용하면 파일이 이미존재하면 덮어씌움 존재하지 않으는다면 파일을 생성하고 파일 내용을 쓸 수 있게함
- >>(꺽쇠 두 번) 사용하면 계속 이어붙여서 작성
cat > hello.py
print('hello ~')
# 이후 ctrl + D 를 이용해 빠져나옴
# 확인해보자
git add hello.py
git commit -m 'create' hello.py
git satus
#
cat> hello.py
print('hello, cat!')
git commit -m 'modify 1' hello.py
# 내용변경 된 것을 확인가능!(hello ~ 에서 hello, cat! 으로)
cat hello.py
# 이후 VSCode에서 git graph 확인!
# dev라는 브랜치 생성 후 이동
git checkout -b dev
cat > hello.py
print('hello dog')
git commit -m 'modify 2' hello.py
Git Log
- Branch 별 변경이력을 볼 수 있음
# main branch로 이동
git checkout main
git log
# dev 브랜치의 log확인, modify2까지 확인가능!
git checkout dev
git log
이전 글들이 보고 싶다면?
2022.01.03 - [컴쀼따/Git] - Git1 (Git 이란?)
Git1 (Git 이란?)
Git1 내가 처음 Git을 접했을 때 너무 어려웠다, 처음보면 다 그러니 계속봐서 익숙해지자 ! Git 이란? 버전관리 시스템(형상관리)의 한 종류 Configuration Management Systems, Version Control Systems 버전관..
variety82p.tistory.com
2022.01.03 - [컴쀼따/Git] - Git 2(Global configuration & 기본용어)
Git 2(Global configuration & 기본용어)
Git Global Configuration 기초설정! Global User name & Email 말 그대로 유저의 이름과, 이메일 등록하는 과정 git config --global user.name git config --global user.email Line ending 줄바꿈을 하거나 엔..
variety82p.tistory.com
2022.01.05 - [컴쀼따/Git] - Git3 (Local Repository, Remote Repository)
Git3 (Local Repository, Remote Repository)
Local Repository Local Repository 구성 Local Repository는 Git이 관리하는 3단계로 구성되어 있다. Working Directory(작업공간) - 실제 소스 파일, 생성한 파일들이 존재, 그냥 컴퓨터에 있는 폴더라 생각! In..
variety82p.tistory.com
2022.01.05 - [컴쀼따/Git] - Git4 ( Remote Repository 복제, 클론!)
Git4 ( Remote Repository 복제, 클론!)
Clone을 사용하여 Remote Repository를 로컬에 복제해보자! Remote Repository를 Local로 복제해서 사용하기 Local Repository를 생성하지 않은 상태에서 Git clone 명령을 사용하여 Remote Repository를 Local에..
variety82p.tistory.com
2022.01.05 - [컴쀼따/Git] - Git5 (Branch)
Git5 (Branch)
협업과 버전관리를 위한 Branch를 AraBoza! Branch 브랜치란 독립적으로 어떤 작업을 진행하기 위한 개념, 필요에 의해 만들어지는 각각의 브랜치는 다른 브랜치의 영향을 받지 않기 때문에, 여러 작
variety82p.tistory.com
'💻 > Git' 카테고리의 다른 글
Git8 (Merge and Conflict) (0) | 2022.01.05 |
---|---|
Git7 (Git Diff) (0) | 2022.01.05 |
Git5 (Branch) (0) | 2022.01.05 |
Git4 ( Remote Repository 복제, 클론!) (0) | 2022.01.05 |
Git3 (Local Repository, Remote Repository) (0) | 2022.01.05 |