[TIL] 2023-03-30 DAY11
npx create-react-app dapp
npm run start
-> dapp/package.json의
"scripts": {
"start": "react-scripts start",
을 실행한 것과 같음
function App() {
return <h1>Hello, React!</h1>;
}
export default App;
import "./index.css";
테일윈드 라이브러리에 저장된 css를 className 통해 불러올 수 있음
<div className="max-w-screen-xl mx-auto h-full flex justify-between items-center">
.
index.css에서 함수를 만들어서 반복되는 css를 줄일 수 있음
@layer components {
.btn-style {
@apply px-2 py-1 rounded-md text-white cursor-pointer;
}
}
브랜치 관리
git branch <브랜치명>
git checkout <브랜치명>
Git & GitHub 3
git checkout -b <브랜치명>
git switch <브랜치명>
git branch -a
git remote update
git fetch origin
git merge <브랜치명>
git branch -d <브랜치명>
git pull = git fetch + git merge
git checkout <브랜치명>
git rebase main
git rebase --abort
이미 공개 저장소에 Push 한 커밋을 Rebase 하지 말 것
git pull origin <브랜치명>
git Clone
git clone <주소> <폴더명>
주의사항
협업 시 개인 브랜치에서
git remote update →
git pull origin main →
git checkout -b <브랜치명> →
작업 시작 →
git pull origin main 후 push 습관화 중요
Git & GitHub 4
git <명령어> -h
git --help
https://git-scm.com/book/ko/v2/시작하기-CLI