< Return to Video

Pull Requests • GitHub & Git Foundations

  • Not Synced
    Pull requests are a core part
  • Not Synced
    of making a change
    to any GitHub repository.
  • Not Synced
    Let's figure out
    how to use them effectively.
  • Not Synced
    (smooth music)
  • Not Synced
    Pull requests are a means
  • Not Synced
    of submitting a change
    to another code base.
  • Not Synced
    You can do this
    whether you're a core contributor,
  • Not Synced
    or you're working
    at arm's length with a fork.
  • Not Synced
    If you're not a core contributor,
    you can fork this project,
  • Not Synced
    work on that change on your own
  • Not Synced
    and send that change back as a proposal
  • Not Synced
    on a pull request to the original author.
  • Not Synced
    It means that making a correction
    becomes easier than making a complaint,
  • Not Synced
    which is why GitHub has really facilitated
    the growth and development of Open Source.
  • Not Synced
    Just make that edit,
    make it better,
  • Not Synced
    everyone benefits.
  • Not Synced
    This also applies to closed projects,
    corporate projects, private repos.
  • Not Synced
    If you do have access
    to push to a repository,
  • Not Synced
    you should still work on a branch
    and send that pull request
  • Not Synced
    to get some review on your code.
  • Not Synced
    This means you're going
    to create a branch,
  • Not Synced
    start making some commits,
    and when you're ready to get it reviewed,
  • Not Synced
    send that back to everyone else
    on your team in that pull request.
  • Not Synced
    This means that a pull request
    is a conversation,
  • Not Synced
    not just a one-shot submission
    of what's on a branch,
  • Not Synced
    but rather, a little bit
    of dialogue and discussion,
  • Not Synced
    some revision to the code,
    that all appears in chronological order,
  • Not Synced
    and finally, an approval,
    or in the terrible case,
  • Not Synced
    a thumbs down that says, "this does not
    seem like a wise change to the code base."
  • Not Synced
    But in either of those two situations,
    the URL and the pull request lives on.
  • Not Synced
    You don't have to stop talking
  • Not Synced
    just because things
    were closed out and not accepted.
  • Not Synced
    You can continue to find out
    why it wasn't accepted
  • Not Synced
    and what changes
    you can make in the future
  • Not Synced
    to make sure all your pull requests
    will be accepted.
  • Not Synced
    This also serves as an educational tool
  • Not Synced
    for people who join the team
    at a later time.
  • Not Synced
    These pull requests are dialogues
    of what type of change
  • Not Synced
    might be culturally acceptable here,
  • Not Synced
    what are the expectations,
    requirements, formats
  • Not Synced
    that people expect stuff in,
  • Not Synced
    and you can save these URLs
    and point to them as educational tools
  • Not Synced
    for these new individuals.
  • Not Synced
    This means you don't have
    to forward on some email conversation
  • Not Synced
    about how a feature came to be.
  • Not Synced
    You can just point someone to a URL
    and they can look at it for all time.
  • Not Synced
    We're also interested
    in the technical inputs,
  • Not Synced
    not just the human ones.
  • Not Synced
    A CI system, continuous integration,
  • Not Synced
    like Travis, Hudson,
    Jenkins, Circle CI, Team City,
  • Not Synced
    can all integrate
    with a GitHub pull request
  • Not Synced
    and report the build status
    for this branch,
  • Not Synced
    the fundamental unit of a pull request,
  • Not Synced
    right in the line with that conversation.
  • Not Synced
    So that means along with the conversation
    and the changes to code,
  • Not Synced
    there's little build statuses
    that'll pop up to say,
  • Not Synced
    "yes, all the tests have passed"
    or "no, we have some failing test".
  • Not Synced
    It also affects the status
    of the Merge button
  • Not Synced
    providing you a warning saying,
  • Not Synced
    "wouldn't you like to have
    all the tests passing
  • Not Synced
    and this branch be clean,
  • Not Synced
    before you potentially press
    this Merge Pull Request button?"
  • Not Synced
    So now that we have CI status integrated
    with the idea of human feedback,
  • Not Synced
    we have holistic, human review
    plus technical set of tests,
  • Not Synced
    but not only on the contents
    of the branch,
  • Not Synced
    but on a predictive merge
    of both the branch and its destination,
  • Not Synced
    so you get to see into the future
  • Not Synced
    what this would be like if it was merged.
  • Not Synced
    This doesn't mean
    that that merge is permanent.
  • Not Synced
    It'll actually do that predictive merge,
    see how things go,
  • Not Synced
    and then let you know
    if you did merge this in,
  • Not Synced
    if you would be successful or not.
  • Not Synced
    So if CI reports a good status,
    you have social acceptance
  • Not Synced
    with a couple of thumbs up
    and ship its in the thread,
  • Not Synced
    it's time to press
    the Merge Pull Request button.
  • Not Synced
    Once that happens, you're also presented
    with the option to delete the branch,
  • Not Synced
    which sounds kind of scary,
    but isn't a bad thing.
  • Not Synced
    We don't have to really worry
    about closing out and deleting that branch
  • Not Synced
    because all of the commits
    are in the destination branch.
  • Not Synced
    They've been preserved,
  • Not Synced
    so you can delete that branch
    to let people know
  • Not Synced
    future development
    isn't happening over there.
  • Not Synced
    The pull request still stays around,
  • Not Synced
    in case you want
    the record of the discussion,
  • Not Synced
    and your identity and the credit
    for the work that you've done
  • Not Synced
    appears in the destination branch
    along with those merged in commits.
  • Not Synced
    Thanks for watching this Git
    and GitHub Foundations episode
  • Not Synced
    on the World renowned pull request.
  • Not Synced
    Don't forget to click Subscribe
    on any of these channels on the side.
  • Not Synced
    Or, ask us a question
    or leave a comment down below,
  • Not Synced
    or check out any
    of these other educational videos
  • Not Synced
    on Git and GitHub topics.
Title:
Pull Requests • GitHub & Git Foundations
Description:

more » « less
Video Language:
English
Team:
GitHub
Project:
Git and GitHub Foundations
Duration:
04:27
There has been no activity on this language so far.

English subtitles

Revisions Compare revisions