DS School Week 9-2 Git

Henny Song·2023년 6월 30일
0

DS Studylog

목록 보기
27/38
post-thumbnail

오늘 학습 계획

  • Git : Log & Diff 강의수강
  • Git : Merge & Conflict 강의수강
  • Git : Tag 강의수강
  • Git : README 강의수강

학습내용

1.Log와 Diff

  • Git Graph
    • vscode의 extension
  • Git Log
    • 브랜치의 변경이력 조회 %git log
  • Git Editor 설정
    • % git config --global core.editor <editorname> --wait
      * --wait : VSCode 인스턴스를 닫을 때 까지 command 를 대기
  • Git Diff Tool
    • Git Configuration 파일 열기
      % git config --global -e
    • Git Diff 설정 추가
      [diff]
      		tool = vscode
      [difftool 'vscode']
          cmd = 'code --wait diff $LOCAL $REMOTE'  
  • Git Diff
    • local diff간 비교
      %git diff <branch1> <branch2>
      %git difftool <branch1> <branch2>
    • commit간 비교
      %git diff <commithash> <commithash>
      %git difftool <commithash> <commithash>
    • 마지막 commit과 이전 commit 비교
      %git diff HEAD HEAD^
    • 마지막 commit과 현재 수정사항 비교
      %git diff HEAD
      %git difftool HEAD
    • local과 remote간 비교
      %git diff <branch> origin/<branch2>
      %git difftool <branch> origin/<branch2>

    2.Merge와 Conflict

  • Git Merge Tool
    • Git Congifuration 파일 열기
      %git config --global -e
    • Git Merge 설정 추가
      [merge]
      	tool = vscode
       [mergetool "vscode"]
       	cmd = "code --wait $MERGED"
  • Git Merge
    %git merge <branchanme> : 현재 위치한 branch에 다른 branch를 병합
  • Conflict 해결
    %git mergetool → diff 표시 → Conflict 코드 삭제 → 저장 → 종료 →
    Conflict 해제 : Git add + Git commit

3. Tag

  • Tag : 중요한 commit에 tagging 하는 것
  • % git tab <tagname> : 현재버전에 tag 달기
  • % git log : 태그 확인하기
  • % git tag <tagname> <commithash> : 특정 버전에 tag 달기
  • % git push origin <tagname> : Remote Repository에 push
  • % git tag : 태그 목록보기
  • % git show <tagname> : 특정 태그의 상세정보 보기
  • % git tag --delete <tagname> : 태그 삭제
  • % git push --delete origin <tagname> : Reomote Repository에서 삭제

4. READ ME

  • 프로젝트에 대한 설명, 사용방법, 라이센스, 설치법 등 기술
  • 마크다운 문법
    • 큰 제목
      text + '======='
    • 작은 제목
      text + '------'
    • 글머리 (header)
      # text
      ## text
      ...
      ###### text
    • 블럭 인용문자 블럭 내에서 다른 마크타운 요소 포함 가능
      > text
      >> text
    • 목록
      * text
      \quad+ text
      \quad\quad- text
    • 코드블럭
      <pre><code>text</code></pre>
      ```text```
    • 수평선
      * * *
      - - -
      --------
    • 외부링크
      Link: [text](link)
    • 자동 연결
      <link>
    • 강조
      *text* : text
      _text_ : text
      **text** : text
      __text__ : text
      ~~text~~ : text
    • 이미지
      Repository에서 issue 생성-> 이미지 업로드 -> 마크다운 문법 복사 (저장x)
  • Local 작성법
    vi README.md
    i: 편집 모드
    작성
    esc
    :wq

다음 학습 계획

  • 통계 강의수강
  • SQL 학습과제

0개의 댓글

관련 채용 정보