여러분 작업 전에 꼭 git pull 하세요~~~ 😎
일단 2020년 10월부터 기본브랜치가 master가 아닌, main으로 변경되었습니다.
(다시말해, 새로운 레파지토리를 만들면 기존에 익숙했던 master라는 이름이 아니라, main이라는 이름을 보게 됩니다.)
https://blog.outsider.ne.kr/1503
윈도우
git config --global core.autocrlf true
맥
git config --global core.autocrlf input
이건 필수가 아닙니다만, 전 이렇게 써요~
git config --global alias.st status
git status 길게 안 적어도, git st 로 동일한 결과를 얻을 수 있습니다.
- pull request : merge전에 팀원들에게 리뷰 받는것 (master브랜치 보호 용도)
- merge : 브랜치를 하나로 모으는 것
- merge 전
- merge 후
source: https://backlog.com/git-tutorial/kr/stepup/stepup1_1.html
-
팀원들을 프로젝트의 collaborator로 초대합니다.
: settings -> manage access -> invite a collaborator
-
main 브랜치에 규칙을 추가합니다.
다음 내용은, 누군가 pull request를 했을 때, 한 명만 리뷰를 한다면, merge할 수 있도록 하며, 이는 admin에게 동일하게 적용되도록 설정한 것입니다.
프로젝트 repository를 local로 클론해온 상황(main 브랜치)에서 시작합니다.
git branch [브랜치명]
git checkout [브랜치명]
/* 작 업 수 행 */
git add .
git commit -m '메세지'
git push origin [브랜치명]
git rm --cached *
git reset HEAD^
(바로 직전 commit을 취소하는 경우입니다.)