

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 7
click for more info
Not enough gems
Cost: 6 gems
1: Welcome to Learn Git 2
incomplete
2: Creating a Fork
incomplete
3: What Is a Fork?
incomplete
4: Clone Megacorp
incomplete
5: Disable RERERE
incomplete
6: PRs from a Fork
incomplete
This lesson's interactive features are locked, please to keep using them
When you fork someone's repository on a platform like GitHub, you get a copy of the repository in your account. This is the standard way to contribute to someone else's open-source project. The steps are typically:
Fork their repo into your account
Clone your fork to your local machine
Create a new branch (let's call it your_feature)
Make changes
Commit and push changes to your fork's remote your_feature branch
Create a pull request to original_owner/repo main from your_username/repo your_feature
Then the original owner can review your changes. If they like them, they can merge the changes straight from your fork into their repository.
add myself as a contributorWe don't need the add_contrib branch anymore, so delete it from your local repo after switching back to main. Do NOT merge them.
To delete a branch locally while in a different branch use:
git branch -D branch_name-D is the shortcut for --delete --force.