uts-ios-dev / uts-ios-2019-project3-group-114

uts-ios-2019-project3-group-114 created by GitHub Classroom
0 stars 1 forks source link

git command collection #5

Closed jeannieyeliu closed 5 years ago

jeannieyeliu commented 5 years ago

how to fetch from remote branch

see stack overflow question

# daves_branch means the remote branch
git checkout --track origin/daves_branch

# or
# this one seems to work for the 1st time, when lbranch doesn't exist
git fetch <remote> <rbranch>:<lbranch> 
git checkout <lbranch>

second time in
git checkout <lbranch> 

e.g.
# 1st time
git fetch origin newCalendarView:
git checkout newCalendarView

#2nd time
git pull origin newCalendarView

How to sync branch

jeannieyeliu commented 5 years ago

how to solve conflict when pull from remote branch

https://akshayranganath.github.io/Git-Pull-Handling-Merge-Conflict/

jeannieyeliu commented 5 years ago

how to merge to master or another branch on GitHub

on pull request tab, click New Pull Request select from branch and to branch go merge