[Code2Pro] Create GitHub Pull Requests Like a Pro Using Branches
-
Upload
viet-le -
Category
Technology
-
view
196 -
download
0
Transcript of [Code2Pro] Create GitHub Pull Requests Like a Pro Using Branches
DEV VIỆT RA KHƠICREATING PULL REQUESTS LIKE A PRO
CREATING PULL REQUESTS LIKE A PRO
A B C D E F upstream/master
origin/master
origin/week1 origin/week2 origin/week3
PR
PR
PR
G H
CREATING PULL REQUESTS LIKE A PRO
1. Create a “git remote” upstream 2. Keep your master in sync with upstream 3. Create a feature branch, develop 4. Push feature branch and create a PR
CREATE A “GIT REMOTE” UPSTREAM
CREATING PULL REQUESTS LIKE A PRO
$ git remote -v
$ git remote add upstream https://github.com/DevVietRaKhoi/weekly.git
$ git remote -v
KEEP YOUR MASTER IN SYNC WITH UPSTREAM
CREATING PULL REQUESTS LIKE A PRO
$ git checkout master
$ git fetch upstream
$ git reset --hard upstream/master
CREATE A FEATURE BRANCH, DEVELOP
CREATING PULL REQUESTS LIKE A PRO
$ git checkout -b featureX
$ git add abc
$ git commit -a -m’XYZ’
PUSH FEATURE BRANCH AND CREATE A PR
CREATING PULL REQUESTS LIKE A PRO
$ git push --set-upstream origin featureX
Create a pull request via GitHub web interface
THAT’S ALL FOLKS!
DEV VIỆT RA KHƠI
For more tips, video & tutorials, check: https://fb.com/code2pro