GIT 3 - Diff, Merge

subinii·2024년 5월 27일

DS 25기

목록 보기
40/46

Log and Diff

GIT Graph

git log

  • branch 별 변경이력을 볼 수 있음

git editor

git config —global <core.editorname> —wait (—wait : command 대기)

git diff tool

  • git configuration 파일 열기
git config —global -e

  • GIT DIFF 설정 추가
  • GIR DIFF 비교하기

Merge and Conflict

merge tool 설정

  1. git configuration 열기
git config —global -e
  1. git merge 설정 추가

  2. get merge : 현재 위치한 branch에 다른 branch를 병합

git merge <branchname>
  1. merge conflict

실습

  • dev : 코드 확인
  • main : 코드 확인
  • main에 dev merge하기
  • git graph 확인
  • 새로운 코드 commit
  • dev2 생성, 코드 삽입, commit
  • main에 dev2 merge하기
  • 오류로 인해 mergetool 활용해서 vscode로 merge 하기

"이 글은 제로베이스 데이터 취업 스쿨의 강의 자료 일부를 발췌하여 작성되었습니다.”

profile
데이터 공부 기록

0개의 댓글