Return to Video

New - Keeping a Fork Up-To-Date Solution

  • 0:00 - 0:04
    First, I want to add the original
    repository as a remote to my clone, so
  • 0:04 - 0:06
    I'll copy the URL here.
  • 0:06 - 0:09
    Then I'll run git remote add.
  • 0:09 - 0:13
    I'll name the remote upstream, and
    I'll paste in the URL I just copied.
  • 0:13 - 0:16
    Now I'll check out the master branch and
    bring it up to
  • 0:16 - 0:22
    date with the original repository by
    running git pull upstream master.
  • 0:22 - 0:27
    When I run git log, I can see that
    the chocolate sprinkler changes here.
  • 0:27 - 0:30
    Now I'll check out the stop,
    drop, and roll branch again, and
  • 0:30 - 0:35
    I'll merge it with the master branch by
    running git merge master stop-drop-roll.
  • 0:35 - 0:38
    I'll resolve the merge conflict
    by adding my stop, drop, and
  • 0:38 - 0:41
    roll option alongside
    the chocolate sprinkler option, and
  • 0:41 - 0:45
    then I'll get rid of the special lines
    and the other versions of the file.
  • 0:45 - 0:48
    Next I'll add the fire and
    commit to complete the merge.
  • 0:48 - 0:51
    Finally, I'll run git push
    origin stop-drop-roll to
  • 0:51 - 0:53
    push this branch to my fork.
  • 0:53 - 0:56
    Note that you'll need to push this
    to origin, which is your fork.
  • 0:56 - 0:59
    And not upstream,
    which is the original repository.
  • 0:59 - 1:03
    Since you don't have permission to
    push to the original repository.
  • 1:03 - 1:06
    Since I also want master on
    my fork to be up to date,
  • 1:06 - 1:09
    I'll also check out the master
    branch and push that as well.
  • 1:10 - 1:12
    Now it looks like my pull
    request is good to be merged.
Tytuł:
New - Keeping a Fork Up-To-Date Solution
Opis:

more » « less
Video Language:
English
Team:
Udacity
Projekt:
UD775 - How to Use Git and GitHub
Duration:
01:13

English subtitles

Revisions Compare revisions