소프트웨어의 변경사항을 체계적으로 추적하고 통제하는 것
설치되어 있다면 pass 난 이미 설치되어 있어 이후 과정은 진행하지 않아 아래 과정 진행하지 않음
git --version
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
zsh: command not found
# 홈브루를 /opt 디렉토리에 설치하기 위해 이동
% cd /opt
# 루트 권한으로 homebrew 폴더를 만든다
% sudo mkdir homebrew
# homebrew 폴더의 루트 권한을 유저로 바꿔준다
% sudo chown -R $(whoami) /opt/homebrew
//sudo chown -R 유저명 경로 = 경로의 권한을 유저한테 준다는 뜻
# homebrew 다운로드
% curl -L https://github.com/Homebrew/brew/tarball/
master | tar xz --strip 1 -C homebrew
# homebrew bin 디렉토리를 PATH에 추가
% echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
# homebrew 홈페이지에 있던 명령어를 이제 실행!
% /bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/nrubin29/
bea5aa83e8dfa91370fe83b62dad6dfa/raw/
48f48f7fef21abb308e129a80b3214c2538fc611/homebrew_m1.sh)"
Copyright zerobase Corp. All Rights Reserved
# 설치완료
% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/
install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password).
Password:
Press RETURN to continue or any other key to abort
...
Downloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode Installing Command Line Tools for Xcode
Done with Command Line Tools for Xcode
Done.
==> /usr/bin/sudo /bin/rm -f /tmp/
.com.apple.dt.CommandLineTools.installondemand.in-progress
Password:
...
==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:
%
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/insang/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
%
% brew install git
....
Emacs Lisp files have been installed to:
/opt/homebrew/share/emacs/site-lisp/git
%
% brew install git
zsh: command not found: brew
% eval "$(/opt/homebrew/bin/brew shellenv)"
% brew install git
....
Emacs Lisp files have been installed to:
/opt/homebrew/share/emacs/site-lisp/git
%
git --version
git config --global user.name <username>
git config --global user.email <email>
예시 >>
% git config --global user.name zerobasegit
% git config --global user.email zerobase.git@gmail.com
for mac
% git config --global core.autocrlf input
for window : 가져올 때는 LF 를 CRLF 로 변경하고 보낼때는 CRLF 를 LF 로 변경
-LF가 기본 통용임으로 윈도우-맥 유저간 협업 작업을 위해 LF로 변경하고 보내는 설정 필수
-그렇지 않으면 CRLF 차이로 인해 commit 이 발생할 수 있음
% git config --global core.autocrlf true
아래 "💡 Editor"에서 추가 설명
git config --global core.editor <editor>
>> 예시
% git config --global core.editor vim
% git config --list
>> 예시
% git config --list credential.helper=osxkeychain
user.name=<username>
user.email=zerobase.<email>
core.editor=vim
core.auticrlf=true
git config --global core.editor <editor>
>> 예시
% git config --global core.editor vim
git config --global core.editor <editor> --wait
% git config --global core.editor
% git config --global core.editor "code --wait"
% git config --global -e
[diff]
tool = vscode
[difftool "vscode"]
cmd = "code --wait --diff $LOCAL $REMOTE"
[merge]
tool = vscode
[mergetool "vscode"]
cmd = "code --wait $MERGED"
제로베이스 데이터취업스쿨 강의
형상관리에 대해서... SCM, VCS, SVN, git...
나무위키_git