ASAC-06-Team-C / reddit-clone

[ASAC] Team C Reddit Clone
0 stars 0 forks source link

Develop 브랜치에서 shadcn 설정 후 Rebase #3

Closed Seok-Hun closed 3 weeks ago

Seok-Hun commented 4 weeks ago

이슈 내용

현재 각각의 브랜치에 shadcn이 따로 설정되어 있어서 이를 develop 브랜치에 통합해야 합니다. 통합 후 각각의 브랜치에서 develop 브랜치로 Rebase 필요

Seok-Hun commented 4 weeks ago

shadcn 설정

[shadcn/ui 설치 가이드] (https://ui.shadcn.com/docs/installation/vite)

  1. 터미널 입력 : npm install -D tailwindcss postcss autoprefixer
  2. 터미널 입력 : npx tailwindcss init -p
  3. jsconfig.json 수정
    {
    ...
    "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./src/*"]
    }
    }
    }
  4. index.css에 추가
    @tailwind base;
    @tailwind components;
    @tailwind utilities;
  5. tailwind.config.js에 추가 content: ['./src/**/*.{js,jsx,ts,tsx}'],
  6. 터미널 입력 : npx shadcn@latest init
Seok-Hun commented 4 weeks ago

Rebase 수행

shadcn을 설정한 develop 브랜치에서 개인 브랜치가 분기되도록 Rebase 수행

  1. git pull로 최신 브랜치 정보 가져오기
  2. git checkout 브랜치로 Rebase할 브랜치로 이동
  3. git rebase -i develop으로 Rebase 시작
  4. editor에서 commit 수정 없이 저장 후 닫기
  5. 각각의 commit에 맞춰 conflict 부분 해결(Head : develop의 내용)
  6. conflict 해결 시 git rebase --continue로 다음 commit의 conflict 해결
  7. Rebase 과정이 종료될 때 까지 5,6번 과정 반복