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>

3. Add pair’s fork as remote

git remote add pair <Repo URL for pairs fork>
git remote -v

4. Commit your change to your local repo

git add <change file>
git commit -m'change'

5. Push your code to your remote origin

git push origin master(or other branch name)

6. Pull pair’s code to local repository

git pull pair master(or other branch name)

7. Commit pair’s change to local repo

git add <change file>
git commit -m'change from B'

8. Push pair code to pair’s remote origin

git push origin master(or other branch name)

9. You pull latest version of pair’s code

git pull pair master(or other branch name)

10. Repeat

Git Branch

  • 새로운 기능을 개발할 때
  • 원본에 영향 주지 않고 다양한 시도를 하고 싶을 때
  • 현재 작업 공간을 베이스로 만들어 진다
  • 항상 내가 현재 작업하고 있는 곳을 확인

작업 공간 옮기기

git checkout <브랜치 이름>

브랜치 생성 & 작업공간 이동

git checkout -b 기능1

원본 베이스로 하는 다른 브랜치

  1. 베이스로 하고 싶은 브랜치로 작업공간을 옮긴다
  • 현재 작업공간 : 기능1
git checkout 원본

2. 브랜치를 생성한다

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

--

--

--

Consistency achieves everything https://github.com/paigekim29

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

TIA(This Is Andela ) source of TIA??

AWS: EC2 - Inventory + Cost optimization

Using HashiCorp's Vault to keep your secrets

Installing Bootstrap to a Rails Project

How to Make Your Class Objects Convertible to Other Data Types: Python OOP Complete Course — Part…

A dummy image for better reading and navigation.

Summary of experience in writing trading app storage layer

Learning Kotlin by Mistake

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
Joo Hee Paige Kim

Joo Hee Paige Kim

Consistency achieves everything https://github.com/paigekim29

More from Medium

Loading Javascript Asynchronously (Defer vs Async)

Function in Javascript

Beginner, Intermediate, and Advanced Level JavaScript Interview Questions

Javascript Private Properties, setting and getting errors!

Play To Learn Story