Global Username & Email
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
Windows - 가져올 때는 LF 를 CRLF 로 변경하고 보낼때는 CRLF 를 LF 로 변경
it config --global core.autocrlf true
git config --global core.editor <editor>
git config --global core.editor vim
git config --list
% git config --list
credential.helper=osxkeychain
user.name=zerobasegit
user.email=zerobase.git@gmail.com
core.editor=vim
core.auticrlf=true
git config <key>
git config user.name
zerobasegit
하나씩 볼 수 있음.
• 소스코드가 저장되어 있는 여러 개의 Branch 가 모여있는 디스크상의 물리적 공간
• Local Repository 와 Remote Repository 로 구분
• 특정 시점이나 Branch 의 소스코드로 이동하는 것을 의미
• Checkout 대상 - Branch, Commit, Tag
• Checkout 을 통해 과거 여러 시점의 코드로 이동이 가능
• 작업할 내용이 올라가는 임시저장영역
• 이 영역을 이용하여 작업한 내용중 commit 에 반영할 파일만 선별하여 commit 을 수행할 수 있음.
• 작업할 내용을 Local Repository 에 저장하는 과정
• 각각의 commit 은 의미있는 변경단위이고, 변경에 대한 설명을 commit log 로 남김
• 권장 - commit 을 아끼지 마세요. (게임의 save point, 아끼면 똥됩니다.)
• 참고 - commit 단위나 commit log format 을 정해놓은 회사나 팀도 있음 (빌드 서버를 사용하는 경우)
• 작업할 내용을 Local Repository 에 저장하는 과정
• 각각의 commit 은 의미있는 변경단위이고, 변경에 대한 설명을 commit log 로 남김
• 권장 - commit 을 아끼지 마세요. (게임의 save point, 아끼면 똥됩니다.)
• 참고 - commit 단위나 commit log format 을 정해놓은 회사나 팀도 있음 (빌드 서버를 사용하는 경우)
• Local Repository 의 내용 중, Remote Repository 에 반영되지 않은 commit 을
Remote Repository 로 보내는 과정
• 권장 - Push 하는 순간 다른 개발자들도 영향을 받음. 검증되지 않은 코드는 Push 하지 않도록 함.
• Remote Repository 에 있는 내용 중, Local Repository 에 반영되지 않은 내용을 가져와서
Local Repository 에 저장하는 과정
• 다른 팀원이 변경하고 Push 한 내용을 Local Repository 에 가져올 수 있음
• 참고 - Push 과정에서 Conflict (충돌)이 일어나서 Push 가 거절된 경우,
Pull 을 통해 Remote Repository 의 변경 내용을 Local Repository 에 반영하여 Conflict 를 해결 한뒤
다시 Push 를 시도해야 함.
• 특정 시점 (commit 단위) 에서 분기하여 새로운 commit 을 쌓을수 있는 가지를 만드는 것
• 개발의 주축이 되는 branch 를 master branch (혹은 main branch) 라고 함
• 모든 branch 는 최종적으로 다시 master branch 에 merge (병합) 되는 형식으로 진행 됨.
• Branch 의 반대개념으로 하나의 Branch 를 다른 Branch 와 합치는 과정
• Merge 되는 두 Branch 는 주종관계가 성립. 예 - dev branch 를 main branch 에 merge
• Merge 되는 과정에서 Confict (충돌) 이 발생하는 경우
Diff 를 수정하여 Conflict 를 해결한 뒤 Merge 를 진행 할 수 있음