https://goseoyoung.tistory.com/47
[Gatsby 블로그] 템플릿 사용해서 localhost 블로그 띄워보기
https://www.gatsbyjs.com/starters/LekoArts/gatsby-starter-minimal-blog/ gatsby-starter-minimal-blog | GatsbyThis starter is part of a german tutorial series on Gatsby. The starter will change over time to use more advanced stuff (feel free to express your
goseoyoung.tistory.com
지난 포스팅에 이어서 GitHub에 Repository를 생성해서 연동해보겠습니다.
1. GitHub 로그인
2. GitHub 프로필 클릭 -> Your Repositories 클릭
3. New 버튼 클릭하여 Gatsby 블로그와 연동할 repository 생성
4. Create a new repository
저는 이미 Repository를 연동해놓은 상태여서 이미 존재한다고 뜨지만 여러분이 원하는 Repository 명을 넣어서 Repository를 생성하세요!
제가 사용한 Gatsby 템플릿에는 README file이 이미 존재해서 Add를 체크하지 않았습니다.
5. git 연동하기
저는 WebStorm을 사용해서 진행하고 있는데요
WebStorm에서는 프로젝트 폴더에서 바로 터미널을 사용할 수 있기 때문에 Option + F12 단축키를 눌러서 터미널에서 GitHub Repository를 연동할 준비를합니다.
WebStorm이 아니여도 괜찮아요 그냥 일반 터미널에서 본인 프로젝트 경로로 이동한 다음에 똑같이 진행하면 됩니다.(맥북 기준.. Window에서는 cmd 창을 이용해야할거에요)
git init
저는 이미 init을 해놓은 상태여서 아래와 같이 뜨는데 Initialized empty Git repository~~~ 이런식으로 메시지가 출력되면 성공적으로 git Repository와 연동할 준비가 된것입니다.
Reinitialized existing Git repository in /Users/seoyeome/gatsby-starter-minimal-blog/.git/
위에서 생성한 Repository의 HTTPS 주소를 이용해서 연동을 합니다.
git remote add origin https://github.com/seoyeome/Gatsby-Blog.git
https~ 이 부분은 본인의 Repository 주소를 넣으셔야합니다. 위의 명령어는 제 주소....
모든 파일을 커밋합니다.
git add .
git commit -m "Initial commit"
커밋한 파일을 push 합니다.
git branch -M main #main이 최근 표준이기 때문에 main으로..
git push -u origin main
만약 GitHub 로그인이 안되어있어서 로그인을 해야하는 경우!
GitHub 계정에서 token을 발급받아서 GitHub 아이디와 발급받은 토큰을 password로 넣으면 됩니다.
프로필의 Settings -> Developer settings에서 발급하세요!
'취업' 카테고리의 다른 글
[Gatsby 블로그] Netlify 사용해서 블로그 배포하기 (0) | 2025.01.03 |
---|---|
[Gatsby 블로그] 템플릿 사용해서 localhost 블로그 띄워보기 (1) | 2024.11.21 |
[Gatsby 블로그] #2 pnpm 설치해서 Gatsby 설치 (0) | 2024.11.20 |
[Gatsby 블로그] #1 Gatsby 알아보기 (3) | 2024.11.19 |
LinkedIn 기본 프로필 아주 쉽게 작성하기★ (0) | 2024.11.18 |