목록Git (11)
변명은 만개 결과는 한개

GIT 서버의 최신 브랜치 당겨오기 ? 깃 upstream, downstream 이란 upstream 과 downstream 은 두 레포간의 관계에 따라 정의되는 상대적인 개념이다 ? Origin 과 Upstream 의 차이 내가 다른사람의 OtherRepo 를 fork 해왔다고 할 때, 이 OtherRepo 가 오리지널 레포이고, upstream 은 이를 지칭하는것 내 포크를 myRepo 라고 할 때, 클론하면 내 레포가 origin 이 된다 원격 저장소(git*.com)에서 최신 브랜치 당겨오기 원격저장소(git*.com)에서 직접 브랜치 (song_test_branch) 만들었으나 git branch -[r|a] 시 확인불가 user@DT MINGW64 ~/git/BEAR (master) $ git..

Pull Request 부터 Merge Pull Request 까지 - 7 원격(fork) repo를 최신으로 업데이트 remote 확인 아래 커맨드로 최신 업데이트를 위한 remote 확인. 이상한 경우 링크참고 git remote -v 원본 repo(upstream) 으로부터 최신 코드 fetch 아래 커맨드로 upstream 으로부터 최신 코드 fetch git fetch upstream fetch 된 코드중 upstream 의 master 브랜치 코드 merge 아래 커맨드로 fetch 된 코드중 upstream 의 master 브랜치 코드 merge git merge upstream/master merge 된 최신 코드를 fork repo(origin) 에 반영 아래 커맨드로 merge 된 최신..

Pull Request 부터 Merge Pull Request 까지 - 6 Merge pull request Merge pull request 위 사진과 같이 PR을 확인한 뒤 Merge pull request 클릭하여 Merge PR 진행 선택적으로 branch 삭제

Pull Request 부터 Merge Pull Request 까지 - 5 Pull Request 생성 Pull Request 생성 위 사진과 같이 fork 한 repo로 이동시 Compare & pull request 버튼 활성화 되어있음. 클릭하여 Pull Request 생성

Pull Request 부터 Merge Pull Request 까지 - 4 수정사항 add , commit , push 수정사항 add git status 커맨드로 변경사항 확인 가능하며 아래 커맨드로 git add 하여 stage 에 올림 git add [항목] 수정사항 commit 아래 커맨드로 add로 staged된 사항 git commit 진행 git commit -m [커밋 메세지] commit된 항목 push 아래 커맨드로 origin(fork된 repository) 에 add push 진행 git push origin [push할 브랜치 명]

Pull Request 부터 Merge Pull Request 까지 - 3 브랜치(branch) 생성 브랜치 생성 아래 커맨드로 branch 생성과 checkout 동시에 진행 git checkout -b [브랜치 이름] 위 커맨드는 아래 두 커맨드를 실행한것과 동일한 동작을 함 git branch [브랜치 이름] git checkout [브랜치 이름]

Pull Request 부터 Merge Pull Request 까지 - 2 깃 clone 및 remote 설정 Repo에서 URL 가져오기 이전에 Fork 했던 Repo 우측상단 Code 클릭하여 URL 복사 git clone 진행 clone 하고싶은 위치에서 git bash 실행하여 아래 커맨드대로 clone 진행 git clone [Forked Repo URL] git remote 추가 Fork 된 Repo 에서 clone 하여 이미 origin 은 추가되어있으니, 원본 Repo 에서부터 URL을 가져와 upstream 라는 이름으로 아래와 같이 연결시킨다. git remote add [원본 Repo URL] 아래 커맨드로 현재 remote 현황 확인 가능 git remote -v

Pull Request 부터 Merge Pull Request 까지 - 1 외부 깃 Repo에서부터 내 Repo에 Fork 로 가져오기 외부 깃 Repo 우측상단의 Fork 클릭 위와 같이 가져오고싶은 외부 깃 Repo 화면의 우측 상단 Fork 를 클릭한다 Fork할 위치를 정하여 Fork 진행 내 개인 github 에 Fork 하여 작업 진행할 예정이므로 내 개인 github 선택후 Fork 진행 Fork 완료 확인 위와 같이 제대로 Fork 된 것 확인완료!