Git
- 등록하기
- 원격 연결
GitHub
- repository
- collaborator
- clone
git clone "link" //링크는 paste
- commit, push, pull, fetch?!?
git commit //vs code에서 버튼 이미지 삽입
- branch관리
- dev/master <- backup (default branch 따로 지정 가능), branch따서 개발
- branch 만들기 / 삭제
(@git bash, @vs code)
--> GIT GRAPH
- merge, pull request
Fork한 repository 최신으로 버전으로 업그레이드 하기 (feat. upstream)
- 원본 소스에서 fork해 온 repo는 별개이기 때문에 원본 소스가 갱신되어도 fork해놓은 브랜치는 예전 상태로 멈춰있음 (아무리 pull&fetch해도 소용없다 이말이야~)
- 이 상황에서 소스를 수정하고 pull request하면 충돌 발생!!!
Solution
- upstream 등록
git remote add upstream https://원본 리포 클론 링크
git remote -v //추가 여부 확인
git fetch upstream //원본 소스코드의 내용을 로컬로 내려받음
- upstream으로 동기화
git merge upstream/master //혹은 해당 remote 리포
충돌이라고? (내가 작업한 파일의 원본이 현재 최신버전의 파일 상태와 다를 때!)
https://webstudynote.tistory.com/116