컴퓨터 과학/[zerobase] Git & GItHub

Chapter 01. Git 정의, Git 설치 방법 ~ Chapter 03. Git 준비하기

계란💕 2022. 10. 5. 14:49

1. Git이란?

 

1.1 Git

  • Git은 형상 관리 도구(Configuration Management Tool, 버전 관리 시스템) 중 하나이다.
  • 효과적 관리: 여러 명시 동시에 작업하더라도 문제 없도록 한다.
  • 소프트웨어의 여러 버전을 동시에 관리 가능
  • Git사이트에서 reference 메뉴에서 모든 기능을 확인 가능하다.
  • 사용하는 이유는? 프로젝트 할 때, 어떤 기능을 빼고 더하고 고치고 수정하는 과정은 필수이다. 
    • 기능을 되돌리게 할 수도 있고 서로 다른 기능의 버전을 유지해야하는 경우도 있다.

 

 

1.2 Git 기반의 온라인 서비스

  • GitHub:프로젝트 소스 코드 클라우드 호스팅 + 특색에 맞는 기능을 제공한다.
  • Bitbucket: Atlassian(Source Tree만든 회사)의 제품들과 연계
  • GitLab: 설치형 Git => 용량에 관한 비용 절감, 소스 코드의 보안성 좋음, 회사 내부에서 소스 코드를 관리한다.
    • GitHub와 BitBucket이 온라인에 소스 코드를 올리는 것(보안성이 떨어질 수 있음)과 다르게 GitLab은 설치해서 회사 내부에서 사용한다.

 

 

2. Git 설치하기 (Windows)

 

  1) Git 사이트에 접속해서 다운로드 버튼 누른다.  https://git-scm.com/

    - 노란박스 클릭하여 다운 받는다.

 

 

  2) 에디터 설정 - 가장 기본으로 설정한다.

    

  3) Git bash를 이용한다.

  • 버전을 확인하기 위해 "git --version" 입력한다.
  • git을 입력하면 사용가능한 명령어가 쭉 나온다.
<hide/>

Ran@DESKTOP-PFV94H5 MINGW64 ~
$ git
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [--super-prefix=<path>] [--config-env=<name>=<envvar>]
           <command> [<args>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone             Clone a repository into a new directory
   init              Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add               Add file contents to the index
   mv                Move or rename a file, a directory, or a symlink
   restore           Restore working tree files
   rm                Remove files from the working tree and from the index
   sparse-checkout   Initialize and modify the sparse-checkout

examine the history and state (see also: git help revisions)
   bisect            Use binary search to find the commit that introduced a bug
   diff              Show changes between commits, commit and working tree, etc
   grep              Print lines matching a pattern
   log               Show commit logs
   show              Show various types of objects
   status            Show the working tree status

grow, mark and tweak your common history
   branch            List, create, or delete branches
   commit            Record changes to the repository
   merge             Join two or more development histories together
   rebase            Reapply commits on top of another base tip
   reset             Reset current HEAD to the specified state
   switch            Switch branches
   tag               Create, list, delete or verify a tag object signed with GPG

collaborate (see also: git help workflows)
   fetch             Download objects and refs from another repository
   pull              Fetch from and integrate with another repository or a local branch
   push              Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.

 

 

GitHub 가입하기

  • Git 저장소 호스팅을 지원하는 웹 서비스로서 가장 많이 쓰이는 서비스이다.
  • 학생이면 무료 버전을 선택한다.

 

 

 

3. Git 준비하기

 

3.1 GitHub 가입하기

 

3.2 Source Tree 설치하기

  - Source Tree Git을 더 쉽게 사용하기 위한 GUI(Graphic User Interface) tool이다.

 

  1) 사이트에 접속한다. https://www.sourcetreeapp.com/ 

    - 다운로드 클릭

 

  2) setup파일을 실행한다.

 

'컴퓨터 과학 > [zerobase] Git & GItHub' 카테고리의 다른 글

Chaper 05. Git 기본 동작 원리  (0) 2022.10.05
Chapter 04. Git SetUp  (0) 2022.10.05
Chapter 10. README  (1) 2022.10.05
Chapter 09. 실무에 Git 적용하기  (0) 2022.10.05
Chapter 08. Git 다른 사용 방법  (1) 2022.10.05