본문 바로가기
목차
utils/git and github

[Git] git 설치 후 우선 해줘야 하는 작업들

by ds31x 2024. 5. 21.
728x90
반응형

 

Git은 운영체제에 따라 패키지 관리자(brew, apt, winget등) 또는 공식 설치 프로그램을 통해 간편하게 설치할 수 있음.

자세한 설치 방법은 공식 Git 문서(git-scm.com)에서 확인해 볼 것.

 

개인적으로 git설치는 conda를 이용하는 경우도 있다. 

conda install git
  • 윈도우즈에서 위 명령어로 git을 설치시, ls, cat, bash등의 명령어도 같이 설치됨 (대상 conda 환경에)

Local Repository를 위한 기본 설정 작업들

 

line feed (or new line)문자와 carrage return에 대한 이해

Git: autocrlf 설정: 개행문자 — Dsaint31's blog (tistory.com)

 

Git: autocrlf 설정: 개행문자

Git: autocrlf 설정: 개행문자(new line)core.autocrlf : git에서 파일을 git repository 에 업로드할 때 개행문자(new line)를 처리하는 option.core.autocrlf : newline관련 설정.core.autocrlf 는 다음과 같은 세가지 mode를 지

dsaint31.tistory.com

 

GIT : 기본 Editor 설정. — Dsaint31's blog (tistory.com)

 

GIT : 기본 Editor 설정.

GIT : 기본 Editor 설정.git config --global core.editor 명령으로 어떤 Editor 를 사용할지 선택 가능함git config --global core.editor "vim" # recommand# git config --global core.editor "code --wait" #vim을 모른다면.# git config --glob

dsaint31.tistory.com

 

참고: [Linux] vi (or vim) 사용법 정리 — Dsaint31's blog (tistory.com)

 

[Linux] vi (or vim) 사용법 정리

vi (or vim) 사용법 정리 더보기관련자료.https://ds31x.tistory.com/174 [CE] Text file : Text 파일이란?"text file" 은 사람과 컴퓨터가 읽을 수 있고 처리할 수 있도록 encoding 된 characters 로 이루어진 electric text li

dsaint31.tistory.com

 

중요: git config 설정 이해하기 **

Git: 사용자와 이메일 정보 설정 및 확인하기 + git config — Dsaint31's blog (tistory.com)

 

Git: 사용자와 이메일 정보 설정 및 확인하기

Git 사용자와 이메일 정보 확인하기[user.name](http://user.name>) 확인하기git config user.name [user.email](http://user.email>) 확인하기git config user.emailGlobal로 Git 사용자와 이메일 정보 설정하기현재 시스템의 모

dsaint31.tistory.com

 

git의 메인 브랜치의 이름이 master에서 main으로 변경(2020년 Black Lives Matter 이후)이 이루어졌으나github등),
기본적으로 master로 만들어지는 문제가 있음.

기본으로 권장되는 main으로 만들어지게 하려면 다음의 명령어를 사용할 것:

git config --global init.defaultBranch main

Remote Repository 를 위한 작업들

2024.05.26 - [utils/git and github] - [Git] Remote Repository

 

[Git] Remote Repository

Remote RepositoryRemote repository는 Git에서 원격 서버에 저장된 저장소를 의미함. 이는 Local repository(로컬 저장소)와 달리 네트워크를 통해 접근할 수 있으며, 협업할 수 있는 중앙 저장소 역할을 함.Remot

ds31x.tistory.com

2026.01.14 - [utils/git and github] - PAT를 통한 authentication for GitHub

 

PAT를 통한 authentication for GitHub

PAT란Personal Access Token의 약어로,기존의 GitHub 계정 password 대신에 사용되는 긴 문자열 Token임.HTTPS 프로토콜로 git push / pull 할 때,password 자리에 PAT를 넣으면 인증이 됨.현재 보안 문제로 password 를 통

ds31x.tistory.com

[ssh-keygen] ssh 관련 private key와 public key 생성하기. (tistory.com)

 

[ssh-keygen] ssh 관련 private key와 public key 생성하기.

ssh (secure shell)ssh는 secure shell의 약자로 네트워크 상에서 암호화된 통신을 위한 프로토콜 (및 이를 구현한 프로그램)을 가르킴. 주로 원격지의 장비에 보안이 보장된 접속을 제공하며 이를 위해

ds31x.tistory.com

 

[github] ssh 키 등록하기. (tistory.com)

 

[github] ssh 키 등록하기.

Github 계정에 ssh public key 등록(설정).ssh public key를 계정에 등록하면 해당 계정의 모든 repository에 ssh 프로토콜로 접속이 가능해짐. 등록하는 방법은 다음과 같음. 1. Settings → SSH and GPG kyes 로 이동

ds31x.tistory.com

 

ssh agent를 통해 비번입력을 최소화할 수도 있음 (본인 장비에서만 사용할 것)

2025.07.21 - [utils/git and github] - SSH Agent 사용법

 

SSH Agent 사용법

SSH Agent는 사용자 로그인 session(세션) 동안 ssh 키에 대한 암호를 유지하여 사용자가 한번만 암호를 입력하게 해줌.macOS SSH Agent 특징macOS는 SSH Agent가 기본적으로 launchd를 통해 자동 실행 됨Keychain과

ds31x.tistory.com

 

 


같이보면 좋은 자료들

2024.05.20 - [utils/git and github] - [Git] Git Summary (작성중)

 

[Git] Git Summary (작성중)

git이란2024.05.20 - [utils/git and github] - Git : 소개 git 설치 후 해줘야 하는 작업들[Git] git 설치 후 우선 해줘야 하는 작업들 (tistory.com)local repository 초기화2024.05.20 - [utils/git and github] - [Git] init : local repo

ds31x.tistory.com


 

728x90

'utils > git and github' 카테고리의 다른 글

git mv  (0) 2024.05.21
git rm  (0) 2024.05.21
git diff  (0) 2024.05.20
[Git] Git Summary (작성중)  (0) 2024.05.20
git commit —amend  (0) 2024.05.20