본문으로 건너뛰기

Git Fork 하고 Pull Request 만들기

원하는 저장소 fork​

  • 원하는 저장소에가서 fork https://github.com/<owner>/<repository>
  • fork된 저장소 https://github.com/<contributor>/<repository>

fork된 저장소 clone​

git clone https://github.com/<contributor>/<repository>

branch 관리​

branch 확인​

git branch -a

branch 생성​

git switch -c <workingBranch>

branch 변경​

git switch <workingBranch>

code 수정​

git add <file>
git commit -m "<message>"
git push

원 저장소에 업데이트된 내용을 local에 병합하기​

git remote add upstream https://github.com/<owner>/<repository>
git pull upstream
git switch <workingBranch>
git rebase upstream/<mainBranch>

conflict 파일이 있는 경우​

vim <conflictFile>
git add <conflictFile>
git commit
git push

Pull Request​