본문 바로가기
Git

[Git] GitHub 저장소 생성하기

by 김뚱 2019. 12. 29.

- 목차 -

1. GitHub 에서 Remote Repository 생성하기

2. Local Repository 생성하기

3. 사용자 등록

4. Remote & Local Repository 연결하기

5. Git 옵션 설정

1. GitHub 에서 Remote Repository 생성하기

사이트 : https://github.com/

로그인 후 New repository 클릭 

 

2. Local Repository 생성하기

local에서 프로젝트와 같은 이름으로 directory 생성한다. 생성위치는 마음대로 한다.

운영체제에 맞는 Git 설치 (Window 64bit 기준) : https://git-scm.com/download/win

cmd 창에서 다음과 같은 명령들을 수행한다.

2-1) cd 경로명/폴더명

2-2) git init

2-3) git status

다음과 같은 그림이 나오면 local repository 성공적으로 생성한 것이다.

3. 사용자 등록

3-1) 전역설정

git config --global user.name "Your name" : github 아이디 작성

git config --global user.email "Your email" : github 이메일 계정

git config --global --list : 전역 설정 정보 검색

 

3-2) repository별 설정

git config user.name "Your name" : github 아이디 작성

git config user.email "Your email" : github 이메일 계정

git config --list : repository별 설정 정보 검색

4. Remote & Local Repository 연결하기

git remote add <remote repository 이름> <repository url>

ex) git remote add origin <repository url>

5. Git 옵션 설정

5-1) 출력결과 색상 설정

git config --global colot.ui "auto"

5-2) 비밀번호 저장

git config --global credential.helper store

5-3) 비밀번호 저장(cache 옵션)

: store 대신 cache 옵션을 주어 15분간 저장되게 할 수 있다. 15분 대신 다른 시간을 지정하려면 다음과 갈이 한다.

git config --global credential.helper cache –timeout 86400

 

참조 : https://greeksharifa.github.io/github/2018/06/29/github-usage-02-create-project/

728x90
반응형

댓글