본문 바로가기

old/Programming

[git]을 [windows 10]에 설치하기

반응형

목적

Windows 10에 git을 설치해보자

git이란?

프로그래밍용 버전 관리용 커맨드 기반 프로그램 입니다. 어떤 파일을 수정할시 그 수정한 시간이나 어떻게 수정했는지 등의 정보를 가지고 있는 파일을 생성합니다.

steps

1. downlad git

official link

2. install the program

3. installation setting

  • Additional icons  > On the Desktop :  바탕화면에 아이콘 추가
  • Windows Exporer integration
    • Git Bash Here : Git Bash 연결기능(폴더에서 Git을 바로 연결할 수 있는 기능) 
    • Git GUI Here : Git GUI 연결기능(폴더에서 Git을 바로 연결할 수 있는 기능)  

오른쪽 버튼을 누르면 나오는 메뉴에 git 전용 명령어를 추가할지 설정

  • Git LFS (Large File Support) - 용량이 큰 파일. git은 원래 프로그래밍을 위해 만들어졌으므로, 기본적으로 텍스트 파일을 저장하는데에 특화가 되어있었으나, 갈수록 서포트 하는 파일이 많아지며 이 설정이 추가됨.
  • Associate .git configuration files with the default text editor - git 구성파일을 기본 텍스트 편집기와 연결
  • Associate .sh files to be run with Bash - 확장자.sh 파일을 Bash와 연결 

- Use a TrueType font in all console windows - 윈도우 콘솔창에서 TrueType 글꼴 사용

  •  Check daily for Git for Windows updates - 윈도우즈용 Git 업데이트를 매일 확인 할지 여부

4. Environment variable(환경변수) setting

  • Use Git from Git Bash only - Git bash에서만 Git Command 수행
  • Use Git from the Windows Command Prompt - Git를 환경변수에 등록하고 윈도우 cmd 등 에서도 Git 사용 가능
  • Use Git and optional Unix tools from the Windows Command Prompt - 윈도우 cmd에서 Git과 유닉스도구를 사용할 경우 환경변수에 추가

5. HTTPS transport backend setting

  • Use the OpenSSL library - OpenSSL 라이브러리 사용
  • Use the native Windows Secure Channel library - Windows 인증서 저장소를 사용하여 유효성 검사

6. conversions setting

  • Checkout Windows-style, commit Unix-style line endings - 체크아웃시에는 윈도우 스타일, 커밋시에는 유닉스 스타일 적용
  • Checkout as-is, commit Unix-style line endings - 체크아웃시에는 스타일 변환 없다. 커밋시에만 유닉스 스타일 적용
  • Checkout as-is, commit as-is - 둘다 스타일 변환 없음

윈도우는 줄바꿈시 "\r\n"를 사용하고, 유닉스 계열에서는 "\n"를 사용한다.
하지만 깃은 여러 컴퓨터에서 쉐어하는것을 상정하고 만들어졌으므로 이런 설정이 생김. 만약 윈도우를 사용하고 있다면 첫번째인 Checkout Windows-style, commit Unix-style line endings에 체크를 해줄것.

7. terminal emulator setting

  • Use MinTTY(the default terminal of MSYS2) - MinTTY terminal emulator 사용(Git bash 기본 터미널 사용)
  • Use Windows’ default console window - 윈도우 기본 콘솔 사용

8. extra option setting

  • Enable file system caching - 빠른 실행을 위해 파일 시스템 데이터를 메모리에 캐시
  • Enable Git Credential Manager - Windows용 Git 보안 자격증명 저장소를 사용하기 위하여, Git 인증관리자 활성화
  • Enable symbolic links - symbolic links 활성화

9. 설치확인

  • 폴더에서 오른쪽 버튼으로 확인
  • cmd에서 명령어 "vit --version"으로 확인

10. 이름과 이메일 설정

깃은 기본적으로 여러명이서 하나의 프로젝트를 수정할시 버전을 관리하기 위한 프로그램임.

그러므로 이름과 이메일이 없으면 에러가 나거나 푸쉬가 안되거나, 아예 거부될수도있음.

설치시에 바로 설정하는것이 여러모로 편함.

아래 명령어로 이름 설정

git config --global user.name "your id"

아래 명령어로 이메일 설정

git config --global user.email "your email"

그후, git config --list 명령어로 확인 가능

git config --list
반응형