Git Rebase vs MergeMariam HakobyanGit rebase rewrites commit history by cutting commits from one branch and applying them to another branch, changing the commit IDs. This cleans up history but can cause issues if commits are pushed. Git merge keeps the original commits and adds a merge commit, keeping full history but potentially cluttering it. Rebase is best for local branches before pushing, while merge is better for integrating public branches to avoid rewriting shared history.
A Practical Introduction to gitEmanuele OlivettiThis document provides an introduction to using git for version control. It outlines three scenarios: 1) a single developer using a local repository, 2) a team of developers using a central remote repository, and 3) contributing to a software project hosted on GitHub. The document demonstrates how to initialize repositories, add and commit changes, branch, merge, resolve conflicts, push and pull from remote repositories, and set up a shared remote repository. It provides summaries of key git commands and demonstrations of workflows through examples.
Git Introduction TutorialThomas RauschA Git tutorial for rookies that covers most aspects of basic Git usage for a medium sized project.
This was originally a semestral lecture given at the TU Wien for the course "Software Engineering and Project Management"
우아한 모노리스Arawn Park마이크로서비스 스타일로 만들어진 시스템을 모노리틱 스타일로 이관한 사례와 함께 스프링을 이용해 모듈형 모노리스(modular monoliths)를 만든 경험을 바탕으로 모노리틱/마이크로서비스 보다 본질적인 문제를 제기하고, 문제 해결을 위한 아이디어와 코드를 공유합니다.
https://github.com/arawn/building-modular-monoliths-using-spring
이 자료는 2019년 KSUG 세미나에서 진행한 "잘 키운 모노리스 하나 열 마이크로서비스 안 부럽다"를 기반으로 몇가지 내용을 추가하고, 전개 방식을 다듬어 조금 더 친절하게 만들어졌습니다.
GitShinu SureshThis document provides an overview of Git and how to use it. It discusses version control systems and how distributed version control systems like Git work. It explains how Git was created by Linus Torvalds for Linux kernel development and why it gained popularity due to its speed and efficiency. The document then covers Git basics like setup, commits, branches and workflows. It also introduces tools for using Git in Eclipse and GitLab for code hosting and collaboration.
Git 더하기 GitHub(구름IDE 환경)Junyoung Lee* ݺߣShare에서 특정 폰트로 쓰인 글자가 보이지 않는 경우가 있습니다. 다운로드 하셔서 PDF 리더로 보시는 것을 권해드립니다. -> 기존 폰트를 모두 나눔고딕으로 변경하였습니다.
OSS 포럼 개발 교육으로 진행한 Git, GitHub 강의 자료입니다.
(http://onoffmix.com/event/67081)
간단한 로또 번호 생성기 프로그램을 작성하면서 Git, GitHub에 대해 배웁니다.
1. Git과 Github
- 버전 관리?
- Git은 어쩌다 세상에 나왔나?
- Github?
2. Git 시작하기 - 실습
- 실습 준비 : Github, Goorm IDE 가입하기
- 리눅스 명령어와 친해지기
- Git 필수 개념 집고 넘어가기
- Step by Step Git 명령어 실습 (커밋, 브랜치, 원격 저장소 등)
- 옆자리 분과 Fork하고, Pull Request
3. Git과 Github 맛깔나게 활용하기
- Github의 협업 기능 살펴보기
- Github Page
- Gitbook
4. 있어보이는 Git 활용
- .git 디렉토리 살펴보기
- Git Branch 전략
- Commit Message 활용
[THR20007] WSL v2와 Rancher K3S로 빠르게 로컬 쿠버네티스 클러스터 만들기 / Quickly create a loca...Jung Hyun NamDemo videos available at https://1drv.ms/u/s!Aj231qrFhIQxqbxbJCrSsQw443FOoA?e=nYebBM
이 세션에서는 Windows 10의 다음 버전에 포함될 WSL v2를 이용하여 로컬에서 빠르게 구축할 수 있는 리눅스 Kubernetes 클러스터를 만들고 테스트할 수 있는 방법을 상세하게 설명합니다.
In this session, I will detail how you can create and test a Linux Kubernetes cluster that you can build locally quickly using WSL v2, which will be included in the next version of Windows 10.
Git and GithubWen-Tien ChangThe document discusses Git and GitHub. It begins with an overview of distributed version control systems (DVCS) like Git and how they differ from centralized version control systems. It then covers the basics of Git, including installing Git, initializing repositories, tracking changes, branching and merging. Finally, it discusses GitHub and how developers can use features like forking, pull requests and wikis to collaborate on projects hosted there. Common Git workflows like Git flow are also introduced.
Git training v10Skander HamzaTwo days git training with labs
First day covers git basis and essential commands
Second day covers git additional command with a big lab using a git workflow
Git and github 101Senthilkumar GopalThis document provides an overview of Git commands and workflows:
- It introduces basic Git commands for setting up a local repository, adding and committing files, viewing the status and differences between commits, ignoring files, and more.
- Common workflows are demonstrated including cloning a repository, making changes and committing them locally, and pushing changes to a remote repository.
- More advanced topics are covered like branching, merging, rebasing, resolving conflicts, and using tools to help with these processes.
- Configuration options and tips are provided to customize Git behavior and inspect repositories.
Git real slidesLucas CoutoThis document provides an introduction to Git basics and concepts. It covers version control systems and why distributed version control is useful. It then discusses how Git originated from the Linux kernel project. The document reviews basic Git commands and workflows for setting up a repository, tracking and committing changes. It also covers viewing differences between commits, staging files, and undoing or amending commits. Finally, it discusses sharing repositories remotely including adding remotes, pushing and pulling from remote repositories, and cloning repositories from remote URLs.
GitMayank PatelCovered:
What is Git?
Why Git?
Git Security
Features
Tooling
JIRA Integration
CI
Git Workflows
Git Training
Glossary
Branching and Release Strategy
Git - Basic Crash CourseNilay BinjolaGit is a distributed revision control system that is widely used in the software development industry. The presentation was used in a lecture delivered in BITS-Pilani, India. The lecture served as a basic crash course on Git.
First, it sets off with a guide to install and configure git on various platforms.
Then, the basic working concepts of Git are explained.
This is followed by a detailed step-by-step guided demonstration of a sample workflow in Git.
Afterwards, Some auxillary commands that are frequently used are discussed briefly.
Finally, basic concepts of branching and merging are detailed.
The presentation ends with a few possible merge conflicts that occur in Git.
Basic Git IntroYoad SnapirA Basic Git intro presentation for SVN long timers doing their first steps in Git.
This presentation is meant to clear up most of the basic concepts which cause confusion with developers using Git as if it was an SVN.
Git 101 for Beginners Anurag UpadhayaGit is a distributed version control system that allows developers to work collaboratively on projects. It works by creating snapshots of files in a project over time. Developers can commit changes locally and then push them to a remote repository to share with others. Key Git concepts include repositories, commits, branches, cloning repositories from remote locations, and commands like push, pull, commit, log and diff to manage changes.
Git and git flowFran GarcíaThis document discusses Git flow and workflows for features, releases, and hotfixes. It explains how to start and finish these branches using git flow commands or equivalent Git commands. It also provides tips for publishing remote branches, dealing with obsolete branches, and fixing common mistakes like amending commits, resetting files, and recovering deleted local branches.
Introduction gitDian Sigit PrastowoThis document provides an introduction to the version control system Git. It defines key Git concepts like the working tree, repository, commit, and HEAD. It explains that Git is a distributed version control system where the full history of a project is available once cloned. The document outlines Git's history, with it being created by Linus Torvalds to replace the commercial BitKeeper tool. It then lists and briefly describes important Git commands for local and collaboration repositories, including config, add, commit, log, diff, status, branch, checkout, merge, remote, clone, push, and pull. Lastly, it covers installing Git and generating SSH keys on Windows for accessing Git repositories.
GitHub Actions in actionOleksii HolubGitHub Actions is an automation platform for GitHub repositories that allows users to build workflows to automate software tasks. It was introduced in 2019 and is based on Azure Pipelines. Workflows are configured using YAML files and can be triggered by events like push commits, pull requests, or scheduled times. Actions, which are reusable code components, can be used in workflows and are sourced from the GitHub marketplace or created by users. GitHub Actions is free for public repositories and offers paid plans for private repositories.
GitShinu SureshThis document provides an overview of Git and how to use it. It discusses version control systems and how distributed version control systems like Git work. It explains how Git was created by Linus Torvalds for Linux kernel development and why it gained popularity due to its speed and efficiency. The document then covers Git basics like setup, commits, branches and workflows. It also introduces tools for using Git in Eclipse and GitLab for code hosting and collaboration.
Git 더하기 GitHub(구름IDE 환경)Junyoung Lee* ݺߣShare에서 특정 폰트로 쓰인 글자가 보이지 않는 경우가 있습니다. 다운로드 하셔서 PDF 리더로 보시는 것을 권해드립니다. -> 기존 폰트를 모두 나눔고딕으로 변경하였습니다.
OSS 포럼 개발 교육으로 진행한 Git, GitHub 강의 자료입니다.
(http://onoffmix.com/event/67081)
간단한 로또 번호 생성기 프로그램을 작성하면서 Git, GitHub에 대해 배웁니다.
1. Git과 Github
- 버전 관리?
- Git은 어쩌다 세상에 나왔나?
- Github?
2. Git 시작하기 - 실습
- 실습 준비 : Github, Goorm IDE 가입하기
- 리눅스 명령어와 친해지기
- Git 필수 개념 집고 넘어가기
- Step by Step Git 명령어 실습 (커밋, 브랜치, 원격 저장소 등)
- 옆자리 분과 Fork하고, Pull Request
3. Git과 Github 맛깔나게 활용하기
- Github의 협업 기능 살펴보기
- Github Page
- Gitbook
4. 있어보이는 Git 활용
- .git 디렉토리 살펴보기
- Git Branch 전략
- Commit Message 활용
[THR20007] WSL v2와 Rancher K3S로 빠르게 로컬 쿠버네티스 클러스터 만들기 / Quickly create a loca...Jung Hyun NamDemo videos available at https://1drv.ms/u/s!Aj231qrFhIQxqbxbJCrSsQw443FOoA?e=nYebBM
이 세션에서는 Windows 10의 다음 버전에 포함될 WSL v2를 이용하여 로컬에서 빠르게 구축할 수 있는 리눅스 Kubernetes 클러스터를 만들고 테스트할 수 있는 방법을 상세하게 설명합니다.
In this session, I will detail how you can create and test a Linux Kubernetes cluster that you can build locally quickly using WSL v2, which will be included in the next version of Windows 10.
Git and GithubWen-Tien ChangThe document discusses Git and GitHub. It begins with an overview of distributed version control systems (DVCS) like Git and how they differ from centralized version control systems. It then covers the basics of Git, including installing Git, initializing repositories, tracking changes, branching and merging. Finally, it discusses GitHub and how developers can use features like forking, pull requests and wikis to collaborate on projects hosted there. Common Git workflows like Git flow are also introduced.
Git training v10Skander HamzaTwo days git training with labs
First day covers git basis and essential commands
Second day covers git additional command with a big lab using a git workflow
Git and github 101Senthilkumar GopalThis document provides an overview of Git commands and workflows:
- It introduces basic Git commands for setting up a local repository, adding and committing files, viewing the status and differences between commits, ignoring files, and more.
- Common workflows are demonstrated including cloning a repository, making changes and committing them locally, and pushing changes to a remote repository.
- More advanced topics are covered like branching, merging, rebasing, resolving conflicts, and using tools to help with these processes.
- Configuration options and tips are provided to customize Git behavior and inspect repositories.
Git real slidesLucas CoutoThis document provides an introduction to Git basics and concepts. It covers version control systems and why distributed version control is useful. It then discusses how Git originated from the Linux kernel project. The document reviews basic Git commands and workflows for setting up a repository, tracking and committing changes. It also covers viewing differences between commits, staging files, and undoing or amending commits. Finally, it discusses sharing repositories remotely including adding remotes, pushing and pulling from remote repositories, and cloning repositories from remote URLs.
GitMayank PatelCovered:
What is Git?
Why Git?
Git Security
Features
Tooling
JIRA Integration
CI
Git Workflows
Git Training
Glossary
Branching and Release Strategy
Git - Basic Crash CourseNilay BinjolaGit is a distributed revision control system that is widely used in the software development industry. The presentation was used in a lecture delivered in BITS-Pilani, India. The lecture served as a basic crash course on Git.
First, it sets off with a guide to install and configure git on various platforms.
Then, the basic working concepts of Git are explained.
This is followed by a detailed step-by-step guided demonstration of a sample workflow in Git.
Afterwards, Some auxillary commands that are frequently used are discussed briefly.
Finally, basic concepts of branching and merging are detailed.
The presentation ends with a few possible merge conflicts that occur in Git.
Basic Git IntroYoad SnapirA Basic Git intro presentation for SVN long timers doing their first steps in Git.
This presentation is meant to clear up most of the basic concepts which cause confusion with developers using Git as if it was an SVN.
Git 101 for Beginners Anurag UpadhayaGit is a distributed version control system that allows developers to work collaboratively on projects. It works by creating snapshots of files in a project over time. Developers can commit changes locally and then push them to a remote repository to share with others. Key Git concepts include repositories, commits, branches, cloning repositories from remote locations, and commands like push, pull, commit, log and diff to manage changes.
Git and git flowFran GarcíaThis document discusses Git flow and workflows for features, releases, and hotfixes. It explains how to start and finish these branches using git flow commands or equivalent Git commands. It also provides tips for publishing remote branches, dealing with obsolete branches, and fixing common mistakes like amending commits, resetting files, and recovering deleted local branches.
Introduction gitDian Sigit PrastowoThis document provides an introduction to the version control system Git. It defines key Git concepts like the working tree, repository, commit, and HEAD. It explains that Git is a distributed version control system where the full history of a project is available once cloned. The document outlines Git's history, with it being created by Linus Torvalds to replace the commercial BitKeeper tool. It then lists and briefly describes important Git commands for local and collaboration repositories, including config, add, commit, log, diff, status, branch, checkout, merge, remote, clone, push, and pull. Lastly, it covers installing Git and generating SSH keys on Windows for accessing Git repositories.
GitHub Actions in actionOleksii HolubGitHub Actions is an automation platform for GitHub repositories that allows users to build workflows to automate software tasks. It was introduced in 2019 and is based on Azure Pipelines. Workflows are configured using YAML files and can be triggered by events like push commits, pull requests, or scheduled times. Actions, which are reusable code components, can be used in workflows and are sourced from the GitHub marketplace or created by users. GitHub Actions is free for public repositories and offers paid plans for private repositories.
Swift - 혼자 공부하면 분명히 안할테니까 같이 공부하기Suyeol JeonThe document contains code snippets demonstrating various Swift programming concepts including variables, constants, types, optionals, functions, classes, structs, enums, and more. Key concepts demonstrated include variable and constant declaration with types, optional binding, functions with parameters and return values, classes and structs with properties and methods, tuples, and enums with associated values and raw values.
Git flowSuraj AairGit Flow is a branching model for Git that provides guidelines for managing feature branches, release branches, and hotfix branches. The main branches are master, which always reflects a production-ready state, and develop, which contains testable code without incomplete features. Supporting branches like feature, release, and hotfix branches have a limited lifetime and are used for parallel development, preparing releases, and quickly fixing production issues. Feature branches branch off develop and must merge back into it, release branches branch off develop and must merge back into both develop and master, and hotfix branches may branch off master and must merge into both master and develop.
Git Workflow With GitflowJosh DvirThis document describes Gitflow, a Git workflow that uses branching for releases and features. It has two main branches - master for production and develop for development. Feature branches branch off develop and merge back into it. Release branches branch off develop, merge into master and develop, and support hotfix branches for production issues. Gitflow provides conventions for branch naming and commands to start, finish, and manage branches to integrate code changes from multiple developers.
Quick Introduction to gitJoel KrebsDistributed version control with git provides a brief introduction to git. It discusses why git was created, what git is, the git object model of blobs, trees and commits, collaborating through local and remote repositories, branching and merging, and an overview of the basic git workflow. The document provides resources for learning more about git.
IoT 서비스 아키텍처 분석 및 Case Study-Innovation Seminar영섭 임IoT_서비스_아키텍처_분석_및_Case_Study_Innovation_Seminar
(from the perspective of integral and modular architectures)
IoT_비즈니스_모델
오픈소스 공헌을 위한 필수 지식Matthew (정재화)Git 기반 오픈소스에 공헌하기 위한 필수 지식인 Git, Github, Pull Request를 보내기 위한 워크 플로우를 설명합니다. 참고로 Apache Tajo 프로젝트를 기반으로 예제를 작성했습니다.
소스트리(SourceTree)로 배우는 Git 사용법주형 고Source Tree로 버전 관리하는 법
- Git이 필요한 이유
- Stage(=Index에 기록)하기
- Commit하기
- Remote 추가하기
- Origin Remote로 GitHub 사용
- Push하기
- Clone하기
- Reset (Soft, Hard, Mixed)
- Revert
- Checkout, Detached HEAD
- 이전 Commit 수정하기
- Pull / Fetch&Merge하기
- Branch 만들기
- Fast Forward Merge하기
- 3-Way Merge하기
- 3-Way Merge에서 발생할 수 있는 Conflict 해결하기
- Visual Studio로 Conflict 해결하는 법
- Stash로 다양한 문제 해결해보기
- 오래된 저장소에서 Pull하기
- 다른 브랜치로 Commit 옮기기
- .gitignore 파일 설정하기
18. 스테이지 영역이 어떤 역할을 하는지 알아볼까요?
로그인 기능 추가
A 버그 수정
B 버그 수정
빌드 목표!
➀ 이런 빌드 목표를 가지고 작업을 하고 있습니다.
19. 스테이지 영역이 어떤 역할을 하는지 알아볼까요?
➁ 다음과 같이 파일들이 수정되었습니다.
login.php
menu.php
head.php
tail.php
style.css
script.js
body.php
로그인 기능 추가
A 버그 수정
B 버그 수정
20. 스테이지 영역이 어떤 역할을 하는지 알아볼까요?
➂ 그런데 로그인 기능 추가가 다음 빌드로 미루어졌습니다.
svn 이라면 보통 어떻게 할까요?
login.php
menu.php
head.php
tail.php
style.css
script.js
body.php
로그인 기능 추가
A 버그 수정
B 버그 수정
❶ 수정 된 login.php를 어딘가로 백업
❷ svn revert를 이용해 원래 상태로 복원
❸ 수정 내역 전체를 커밋
❹ 백업해두었던 login.php를 다시 복구
✕
✕
변경 된 파일들은 무조건 커밋 대상이
되기 때문에 생기는 문제입니다.
21. 스테이지 영역이 어떤 역할을 하는지 알아볼까요?
➃ 그럼 git은 어떻게 하나요?
login.php
menu.php
head.php
tail.php
style.css
script.js
body.php
로그인 기능 추가
A 버그 수정
B 버그 수정
❶ 커밋 할 파일들만 staging area에 추가
❷ 로컬저장소로 커밋✕
✕
22. 귀찮을 수 있습니다.
특별히 파일들을 구분 할 필요가 없을 때에는
-a 옵션으로 스테이치 추가와 커밋을 동시에 할 수 있습니다.
git commit -a
23. 커밋을 마쳤으면, 이제 다른 사람들에게 작업물을 공유합니다.
원격저장소에 올리는 명령어는 push 입니다.
git push
29. 버전1
시간의 흐름
버전2 버전3 버전4 버전5
A 파일
B 파일
C 파일
⊿ 1 ⊿ 2
⊿ 1 ⊿ 2
⊿ 3⊿ 2⊿ 1
svn은 파일의 변화(차이점)를 저장합니다.
30. 버전1
시간의 흐름
버전2 버전3 버전4 버전5
A
B
C
git은 그 순간의 스냅샷으로 저장합니다.
A1
B
C1
A1
B
C2
A2
B1
C2
A2
B2
C3
31. 버전1
시간의 흐름
버전2 버전3 버전4 버전5
A 파일
B 파일
C 파일
⊿ 1 ⊿ 2
⊿ 1 ⊿ 2
⊿ 3⊿ 2⊿ 1
svn에서 버전5의 파일들을 가져오겠습니다.
기초가 되는 파일과 함께 모든 변경 내역을 서버로부터 내려받습니다.
32. 버전1
시간의 흐름
버전2 버전3 버전4 버전5
A
B
C
A1
B
C1
A1
B
C2
A2
B1
C2
A2
B2
C3
가장 가까운 스냅샷들만으로 특정 버전을 빠르게 만들어낼 수 있습니다.
게다가 네트워크를 거치지 않습니다.
git에서 버전5의 파일들을 가져오겠습니다.
33. 지금까지 스냅샷에 대해서 알아보았습니다.
그런데 왜 이렇게 열심히 설명 한 걸까요?
바로 git의 최대 장점인 브랜치branch를 소개하기 위해서입니다.
요게 바로 스냅샷 덕분에 구현 될 수 있었답니다.
35. c1
git의 브랜치
c2c0 c4
c3 c5
master
branch
git은 서버에 그런 논리적 디렉토리 구조를 만들지 않습니다.
다만, 연속된 스냅샷이 순차적으로 이어지다가 가지를 치면서 브랜치가 만들어집니다.
svn의 trunk가 git에서는 master
36. c1
git의 브랜치
c2c0 c4
c3 c5
checkout master
checkout branch
작업자는 작업중에 branch와 master를 자유롭게 이동 할 수 있습니다.
checkout이 svn에서는 내려받는 명령이지만,
git에서는 브랜치를 선택하는 기능입니다.
37. svn과 git의 브랜치가 어떻게 다른지 정리해볼게요.
svn git
만들기 즉시 생성 즉시 생성
내려받기 전체 디렉토리 구조를 내려받음 필요 없음
브랜치 전환 직접 디렉토리를 이동 작업파일들이 실시간 변경됨
병합 위치와 리비전을 명시, 복잡함 빠르고 간편함
38. c1
git의 병합
c2c0 c4
c3 c5
c6
svn의 merge가 위치와 병합 할 리비전을 확인하여 입력하는 등의 절차가 필요했다면,
git의 merge는 브랜치 이름만으로 모든 것들을 자동으로 해결합니다.
merge branch
3-way merge : 각 브랜치와 공통 조상 하나를 이용하여 병합
HEAD
39. git은 수많은 브랜치가 동시에 돌아가는 것을 장려합니다.
➀ 출시를 위한 프로덕션 용 브랜치를 만듭니다.
➁ 기능 추가 혹은 버그 수정을 위해 그때그때 브랜치를 만듭니다.
➂ 아이디어를 실험 해 보기 위해 브랜치를 만듭니다.
svn이었다면 상상도 못할 일이었겠죠?
여러 커밋을 거친 branch를 merge하는 작업을
merge commit 이라고 표현하기도 합니다.
40. git의 브랜치 관련 명령어는 다음과 같습니다:
브랜치 만들기
브랜치 지우기
git branch <name>
git checkout <name>
git branch -d <name>
git checkout -b <name>
두 명령을 한꺼번에 수행하는 명령
브랜치 병합
git checkout master
git merge branch
브랜치 목록
git branch
git branch --no-merged
git branch --merged
branch가 자주 생성, 소멸되므로
현재 존재하는 브랜치 중 어떤 것들이
merge가 되었는지, 안되었는지를
구분 할 수 있어야 합니다.
41. merge중에 충돌은 언제나 일어날 수 있습니다.
branchtrunk
login.php
menu.php
head.php
tail.php
style.css
script.js
body.php
login.php
menu.php
head.php
tail.php
style.css
script.js
body.php
54. branch:login.php
master의 login.php 영역
branch의 login.php 영역
git mergetool 명령을 사용하면 충돌을 쉽게 해결하기 위한 merge 도구를 사용가능합니다.
➀ master와 branch 영역 중 하나를 선택
➁ 혹은 양쪽을 참고하여 새로 작성
➂ , , === 구분자를 삭제
➃ 변경 내역을 add 후, commit
55. 리베이스rebase
rebase는 merge와 동일하게 하나의 브랜치를 다른 브랜치로 병합하는 기능을 합니다.
단, 차이점은?
두 브랜치의 결과를 병합하는 merge와 달리,
rebase는 한 브랜치에서 이루어진 작업 히스토리를
다른 브랜치에 차례대로 적용시킵니다.
왜 쓰는거에요?
둘의 결과물은 완전히 동일하지만,
rebase는 병합 히스토리를 더욱 깔끔하게 남겨줍니다.
공동 작업에서 깔끔한 히스토리를 계속 유지해주고 싶다면
rebase를 적극적으로 사용하는 것이 좋습니다.
57. 태그tag
branch처럼 tag 역시 자체 명령어를 지원하고 있습니다.
태그 만들기
태그 지우기
git tag name
git tag -a name
git tag -d name
-a를 붙이면,
작업자, 설명등을 추가로 저장합니다.
태그 목록
git tag
58. 지금까지 git만의 특징들을 알아보았습니다.
정리하면,
➀ 로컬저장소와 원격저장소의 분리
➁ 스테이지 영역의 존재
➂ 스냅샷을 이용한 버전 관리
분산 처리, 안전한 데이터, 빠른 처리 속도
커밋 대상의 분리
빠르고 편리한 브랜치 병합 기능
이어서 알아두어야 할 git의 나머지 기능들을 살펴보겠습니다...
59. git으로 처음 작업을 시작합니다.
git init
git remote add repository
git pull
// 내 컴퓨터에 새로 빈 로컬저장소를 만들고,
// 이 로컬저장소를 원격저장소에 연결 한 후,
// 원격저장소로부터 데이터를 내려받습니다.
이 방식을 이용하면 로컬저장소와 원격저장소를 수동으로 연결 할 수 있습니다.
하지만 조금 번거롭죠?
60. 처음 시작하는 이런 방법도 있습니다.
git clone repository // 한번의 명령으로 원격저장소로부터 데이터를 내려 받습니다.
ex) git clone /local/repository/path
ex) git clone user@hostname:/remote/repository/path
svn checkout 과 비슷하죠?
로컬저장소는 원격저장소와 쌍둥이입니다.
61. 이번에는 실수했을 때 되돌리는 방법입니다.
git checkout -- // 수정했지만 아직 스테이지에 추가하지 않은
파일을 되돌릴 때,
의외로 많이 사용하는 기능이죠?
svn은 절차가 간단한 반면, git은 더 많은 단계로 인해 좀 더 복잡합니다.
git reset HEAD // 수정했고 스테이지에 추가한 파일을 다시
스테이지에서제거 할 때,
git fetch origin
git reset --hard origin/master
// 수정했고 로컬저장소에 commit 한 파일을
되돌릴 때,
62. 모르면 아쉬운 git의 특징들
➀ 작업 중 브랜치를 변경해야 하는데 커밋하기 애매할 때, 간단히 저장해둘 수 있습니다.
➁ 커밋의 순서를 변경하거나 커밋 메시지 심지어는 커밋한 파일도 변경 할 수 있습니다.
➂ 로그를 자기 입맛대로 포맷팅해서 볼 수 있습니다.
전해드리는 참고사이트에서 더욱 자세하게 살펴보실 수 있습니다.
➃ 이전 커밋에 추가 할 수 있습니다.
stashing이라고 해요!
63. 만약 이렇다면 git이 필요 없어요.
➀ 브랜치나 태그 기능은 사용하지 않아요.
➁ 관리하는 파일들의 규모가 작아서 오래전 버전에 접근하는 데 불편하지 않아요.
➂ 지금까지 svn 서버가 문제가 되어 곤란을 겪은 적이 없어요.
➃ svn이 느리다는 생각은 한번도 해본 적이 없어요.
64. 여러분의 프로젝트에 을 시도해보시기를 권해드립니다.
하지만,
조금이라도 svn이 의심 된다면, 조금이라도 git가 기대 된다면...
65. 참조 사이트 일람
Git
http://git-scm.com/
git - 간편 안내서
http://rogerdudler.github.com/git-guide/index.ko.html
Pro Git 서적 번역
http://git-scm.com/book/ko
Git: Rebase는 언제 어떻게 해야 할까?
http://dogfeet.github.com/articles/2012/git-merge-rebase.html