
Homebrew -> git -> git setting -> 자주 사용하는 commends
이 flow로 작성했다.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
사이트에서 복사 후 터미널에 붙여넣기하면 된다.
(echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/(사용자마다 다르니 이 부분 수정)/.zprofile
eval "$(/usr/local/bin/brew shellenv)"
경우에 따라 Three commands 일 수도 있다고 하는데, 난 항상 two commands 였다.
brew --version
어떤 버전이 설치가 되었는지 확인 가능하다.
brew install git
git --version
git config --global core.autocrlf true
git config --global user.name "(본인 이름)"
git config --global user.email "(본인 이메일)"
git config --global user.name // 이름 확인
git config --global user.email // 이메일 확인
git config --global --list // global 설정값 목록 확인
git init
git init 을 하면 현재 디렉토리 기준으로 저장소가 생성되니 pwd로 경로가 맞는지 확인 후 실행하는 것이 좋다. IDE 내 터미널에서도 생성 가능하다.
init한 경로의 프로젝트 폴더 내에 .git 폴더가 생성되었는지 확인해보는 습관을 기르자.
git config --global init.defaultBranch main
commit까지 입력 후 변경이 가능하다. main or mater 로 설정하면 되는데, main으로 짓는 것이 권장된다.
git status
git init
git clone {url}
git add [파일명] // 특정 파일 add
git add . // 변경된 모든 파일 add
git commit -m "{변경 내용}"
git push
git pull
git remote add origin {원격서버주소}
git rm --cached --ignore-unmatch [삭제할 파일명]
이 글 작성도 쉽지는 않았다. Markdown 너 뭔데... 왜 엔터도 안되는 건데....? 개린둥절...