본문 바로가기
Env

[Git] Git 2.x 설치

by DenverAlmighty 2022. 7. 23.
728x90

RHEL/CentOS 7 에서 yum install git 명령어을 입력하면 기본으로 포함되어있는 git 1.8버전이 설치된다.

2.x 버전을 설치하려면 End Point Yum 저장소를 추가해서 설치하면 된다.

 

End Point Yum 저장소 추가

$ sudo yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm

 

git 설치 또는 업그레이드

# git 설치
$ sudo yum -y install git

# 이미 git 이 설치되어있다면 upgrade를 사용해도된다.
$ sudo yum upgrade git

 

 

Git 1.8 버전과 2.23 버전 차이 

우선 가장 눈에 띄는 변화는 브랜치 전환 명령어 checkout이 switch 로 변경되었다는 점이다.

checkout이 가진 기능이 너무 많아서 switch와 restore 로 나뉘어져졌다.

switch는 브랜치를 전환할 때 사용하고, 워킹 트리의 파일을 복원할 때는 restore 를 사용하면 된다.

 

 

 

참고 사이트

https://www.endpointdev.com/blog/2021/12/installing-git-2-on-centos-7/

https://felipec.wordpress.com/2014/05/29/git-v2-0-0/

https://blog.outsider.ne.kr/1505

 

728x90

'Env' 카테고리의 다른 글

[MAC] 원격 접속  (0) 2022.08.15
[Tistory] 대표 이미지 숨기기  (0) 2022.07.23
[Git] 명령어 정리  (0) 2022.07.17
[Git] GitLab에서 Github 레포지토리 가져오기  (0) 2022.07.08
[Git] Github 토큰 생성하기  (0) 2022.07.08