Day6: 실습68 - 실습77

Author

최규빈

Published

January 10, 2024

실습68: 100MB 충돌

- 100MB가 넘는 파일을 upload할 경우 생기는 충돌 재현

git clone https://github.com/guebin/dinner.git # 각자 레포를 만들고 클론할것 
cd dinner # 클론한 repo로 이동
git config credential.helper store # git 등록 
wget https://media.githubusercontent.com/media/guebin/PP2023/main/posts/fashion-mnist_train.csv # 100MB넘는 csv다운로드 
git add .
git commit -m .
git push 
#여기서 1차당황

- 삭제후 다시 push

rm fashion-mnist_train.csv 
git add .
git commit -m .
git push 
# 여기서 2차당황

- 해결책? local에서 깃폴더삭제하고 다시 clone

실습69: git ignore

- 다시 아래의 상황을 만듦.

git clone https://github.com/guebin/dinner.git # 각자 레포를 만들고 클론할것 
cd dinner # 클론한 repo로 이동
git config credential.helper store # git 등록 
wget https://media.githubusercontent.com/media/guebin/PP2023/main/posts/fashion-mnist_train.csv # 100MB넘는 csv다운로드 

- .gitignore 파일 생성

~/dinner/.gitignore
*csv

- 아래를 시도

git add .
git commit -m .
git push 

- 하위폴더도 영향받음을 확인

  • data라는 폴더를 생성
  • fashion-mnist_train.csv 를 data 폴더로 이동
  • ls data > ./data/data_list.txt 실행 (무슨뜻?)
  • github으로 push

- .gitignore를 잘 사용하는 방법들은 (예를들어서 특정 폴더안에 있는 파일은 모두 git에서 무시하고 싶을때) ChatGPT를 이용하여 스스로 터득할 것

실습70: 블로그 제목이 update 되지 않을때

- 아래를 수행

rm -rf docs
git add .
git commit -m .
git push
quarto render 
git add .
git commit -m .
git push

실습71: dinner를 codespace로 만들기

실습72: revert vs reset

실습73: 한꺼풀씩 revert

실습74: revert, reset이 가능한 이유?

실습75: git과 github의 차이점

실습76: git branch

실습77: mergerebase의 차이점

- 이거 제가 영상에서 설명을 좀 버벅였는데요.. 큰 차이는 없고 git merge를 하면 “재정렬”이 일어나지 않고 git rebase는 “재정렬”이 일어나며 이전에 했던 작업들에 새로운 hash가 부여된다는 점이 차이점입니다.

실습78: 제가 쓰는 방식

- 브랜치쓰지 않음.

- git revert, git reset 정도만 활용