Duqe's Warehouse

Git App for File Exchange 본문

정보기술

Git App for File Exchange

duqe 2024. 9. 18. 21:17

설치 및 초기설정

인스톨

  • Check Default Editor

초기설정

/* Run Git Bash */
/* Move Directory to be used */
$ cd d:/folder

/* Initialization */
$ git init

/* Personal Registration */
git config --global user.email "email registered in github.com"
git config --global user.name "name registered in github.com"

기본사용법

  • git init // Current directory .git create
  • git add <filename> // Staging area
  • git commit -m ‘script’ // Repository
  • git add . // All files
  • git status // Status
  • git log –all –online // Working log

Github.com

  • git clone https://domain/account/repository.git // Download

설정 진행

  • clone from github.com to local
  • upload from local to github.com
    • change directory to position for up
    • git init // .git 숨김폴더 생성
    • git remote add origin https://www.guthub.com/[account name]/[repository name].git
    • git remote -v // 연결확인
    • git remote rm origin // 연결제거
    • git config –global init.defaultBranch main // git init 실행할때마다 branch명을 main으로 하도록 설정(한번만해도 됨.)
    • git pull // 원격저장소의 파일을 로컬로 가져옴.
    • git push –set-upstream origin main // 업로딩 설정?
    • git add *
    • git commit -m “업로딩 메시지. 파일 또는 디렉토리명과 암 상관없는 메시지”
    • git push
    • github.com id/pass insert
  • Reference
    • Be finding original source.

정적 웹사이트 만들기

리포지토리 생성

  • 웹주소는 사용자명.github.io/리포지토리 형식이 됨.

페이지 주소 발행

  • Settings - Pages - Branch 에서 None을 main으로 변경한 후 Save