TIL 2020.11.30

Git Workflow

  1. Both pairs fork repo on Github
  2. Both pair clone thier repo to local
git clone <Repo URL>
git remote add pair <Repo URL for pairs fork>
git remote -v
git add <change file>
git commit -m'change'
git push origin master(or other branch name)
git pull pair master(or other branch name)
git add <change file>
git commit -m'change from B'
git push origin master(or other branch name)
git pull pair master(or other branch name)

Git Branch

  • 새로운 기능을 개발할 때
  • 원본에 영향 주지 않고 다양한 시도를 하고 싶을 때
  • 현재 작업 공간을 베이스로 만들어 진다
  • 항상 내가 현재 작업하고 있는 곳을 확인
git checkout <브랜치 이름>
git checkout -b 기능1
  1. 베이스로 하고 싶은 브랜치로 작업공간을 옮긴다
  • 현재 작업공간 : 기능1
git checkout 원본
git checkout -b 기능2

git workflow

  • After clone, need to connect master repo and local
  • master repo will be updated continuously due to cooperation, always need to update local dev branch
  • After finishing new feature development, need to push to feature branch on my repository
  • Send pull request to master repository and master repository will check and merge

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store