Git In-depth

Forks, Pull Requests, & Upstreams

Nina Zakharenko

Nina Zakharenko

Microsoft
Git In-depth

Check out a free preview of the full Git In-depth course

The "Forks, Pull Requests, & Upstreams" Lesson is part of the full, Git In-depth course featured in this preview video. Here's what you'd learn in this lesson:

Nina discusses fork, which is a copy of the repo that is stored in your GitHub account. Upstream repo is the base repo created in a fork.

Preview
Close

Transcript from the "Forks, Pull Requests, & Upstreams" Lesson

[00:00:00]
>> Nina Zakharenko: What's a fork? A fork is a GitHub concept. It's a copy of a repository that's stored in your GitHub account. You can clone your fork to your local computer. And because that fork is in your account, all of a sudden there's no restrictions. You can push changes, you can edit the code, you can do whatever to your own copy.

[00:00:19]
If you wanna merge back changes, back to the original project, the one that you had forked from. The way that you do that is by a pull request.
>> Nina Zakharenko: A pull request is saying, knock knock, hello maintainer of this project. I've made this awesome cool new feature, I fixed this bug, would you please accept the changes that I am proposing?

[00:00:47]
>> Nina Zakharenko: If you wanna stay up to date while you're working on your fork, other changes are probably getting merged back into that source repository. So if you wanna stay up to date, if you want your fork to stay up to date with the original project, you need to set up something called an upstream.

[00:01:05]
The upstream is the base repository that you created that fork from, and it's not set up by default. When you add an upstream called remote, you can then pull down changes that have been added to the original repository after you forked it.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now