[Git] Git설치 및 사용(Github)

2015. 9. 18. 10:50 - Song's IT

# Git 설치 및 사용(Github)




(1) Git 설치 및 설정



 

① msysGit 설치

링크(https://git-for-windows.github.io/)를 통해 최신버전의 msysGit을 다운로드 및 설치한다. 



② Git Bash실행 및 설정

정상설치가 되었다면 바탕화면에서 마우스 우클릭 시,  Git Bash Here  라는 메뉴가 보일것이다.  아래와 같이 기본설정을 해야한다.
# 사용자 정보 입력
$ git config --global user.name "KyungHun-Song"
$ git config --global user.email "gydbf89@gmail.com"

# 쉘 color 지정
$ git config --global color.ui "auto"

# 사설 인증서를 사용할 경우 ssl 검증을 클라이언트에서 하지 않음
$ git config --global --bool --add http.sslVerify false

# Http POST 요청 버퍼 사이즈를 설정
$ git config --global http.postBuffer 524288000

#UTF-8 설정 (Windows만 해당됨)
$ git config --global i18n.commitEncoding cp949
$ git config --global i18n.logOutputEncoding cp949
 
#intelliJ연동을 위해 ignored 기능 설정(Global Scope)
$ vi ~/.gitignore_global
target
build
bin
.git
.svn
*.class
*.bak
$ git config --global core.excludesfile ~/.gitignore_global



(2) GitHub Repository 생성



 

① Remote Repository 생성
링크(https://github.com/)를 통해 Sign Up을 진행한 후 로그인을 한다. 화면 우측상단에 위치한  New repository  를 클릭하여 Repository를 생성한다.  


원하는  Repository name  및   Description  을 작성하고   Public  과  Initialize thos repository with a README  를 선택한다.   Private  는 유료 코드 비공개 서비스 이다.


② Git Data Transport Commands
아래는 Git Data Transport Command에 대한 도식도이다.

git-transport

일반적인 작업순서는 아래와 같다.
    • Project생성 후 해당 폴더를 Git Local Repository로 설정
    • 작업 후 Local Repository에 Add & Commit하여 반영
    • Push를 통해 Commit된 Local Repository 프로젝트를 Remote Repository에 반영


'Development > Git' 카테고리의 다른 글

[Git] Local Project를 GitHub에 등록하기  (0) 2015.09.18

다른 카테고리의 글 목록

Development/Git 카테고리의 포스트를 톺아봅니다