코딩

github Desktop 이용법 /static website hosting

코딩쪼렙 2021. 10. 13. 12:55
728x90

파일생성하고 올리기

github사이트에서 repository 생성 

githubDesktop에서 clone a Repository from the Internet 선택
repository 이름 검색 ,경로 바탕화면으로 설정  

반드시, 설정한 경로에다 파일을 저장해야함

commit하기

push하기

 

branch 합치기

mainbranch에서 상단메뉴 branch - merge to main branch 하면  branch가 메인으로 합쳐짐

 

static website

staticwebsite: html, css,javascirpt 로만 작성된 페이지 깃허브가 꽁짜 호스팅제공함

but, 몇가지 규칙이있음 
gh-pages라는 브런치 생성, public저장소여야함

publish branch 클릭
본인의 깃헙 페이지에서 environments- github-pages
또는
https://uhyun-k.github.io/KOKOATALK/
유저이름.github.io/파일명/

수정이 필요할 때 
1.master branch 에서 수정하고
2.gh-pages에서도 업데이트해아함 그래야 수정 사항이 올라감

방법: gh-pages에서 상단메뉴branch- update from master
master에있는 모든 commmit을 가져온다는 이야기
3.push

코드를 수정하고싶으면 먼저 master로 이동해야한다는것 명심!