본문 바로가기
깃허브 링크!
GitHub

깃허브 프로젝트시

0. 혹시 모르니까, 작업중인 폴더, 복붙해서, 사본 만들어두기

1. 나는 DJ 브랜치를 파서 작업하고 있었음. 
   EX) nav bar 작업하면, DJ 브랜치에 올렸음. 

2. 중요 업데이트가 들어있는 master-sub pull 받아오기 전, 내 작업물 먼저 push 하기 
git add . 
git commit -m "push 전 내가 한거 commit"
git push origin DJ

3. 중요 업데이트가 들어있는 master-sub pull 받아오기
git branch master-sub 

(생성해야지 내가 이 파일들을 가져올수 있다.)
(git branch가 만들어주는것이고 master-sub가 이름)

git checkout master-sub
git pull origin master-sub (전체 다 받아오기)
git branch (받아진 것 확인)

4. 전체 업데이트 중 필요한 파일만 받기 
git checkout DJ (브랜치 위치를 DJ 로 이동) ⭐⭐
git switch GH 

git checkout -p master-sub home.html (전체 파일 중 필요한 home.html 만 받기)
- (2/4) Apply this hunk to index and worktree [y,n,q,a,d,K,j,J,g,/,e,?]? y (이런 경고창이 나오면 y 누름)

git checkout -p master-sub ./js/home.js
git checkout -p master-sub ./css/home.css

'GitHub' 카테고리의 다른 글

git branch 생성 다시 보자  (0) 2023.06.05
깃허브 마스터  (0) 2023.04.24
깃허브  (0) 2023.04.13
7일차 github  (0) 2023.03.08
6일차 깃허브 사용  (0) 2023.03.07