What is Forking?


A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.

Step 1: Getting Started With Github


Creating an Account


Where the world builds software
“Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.”

-> https://github.com/ alt text here

Download the Github Destop


“Focus on what matters instead of fighting with Git. Whether you’re new to Git or a seasoned user, GitHub Desktop simplifies your development workflow.”

-> https://desktop.github.com/
alt text here

Github.com and github desktop will work together to make your packages and pages go live!

Step 2: Forking a Repository


Using Someone Else’s Project to Learn.



Most commonly, forks are used to either propose changes to someone else’s project or to use someone else’s project as a starting point for your own idea. You can fork a repository to create a copy of the repository and make changes without affecting the upstream repository.

Propose changes to someone else’s project
For example, you can use forks to propose changes related to fixing a bug. Rather than logging an issue for a bug you’ve found, you can:
- Fork the repository.
- Make the fix.
- Submit a pull request to the project owner.

-> We will be forking this project: https://github.com/octocat/Spoon-Knife

Steps to Fork the Example Project


Step 1: Copy the url to the example project we will be using.


Step 2: Go to your Github Desktop, under ‘File’ choose ‘Clone Repository’. Paste the link and choose the path (file) you want your new project to be stored in.


alt text here


Step 3: In your documents find and open the folder ‘Spoon-Knife’. Open the ‘index’ folder, delete the text and write ‘my first fork!!’.


alt text here


Step 4: In the Github Desktop you will see changes have appeared. In the summary box write ‘update’ and click ‘commit to main’.


alt text here


Step 5: Click ‘push origin’ and it will send your work back to the github webpage.


alt text here

Step 3: Your New Project Going Live!



Let’s take a look at our new fork!

Return to the github page, top right corner click on your account and select ‘Your repositories’. Next, click on ‘Spoon-Knife’.


alt text here alt text here


Top right click on ‘settings.


alt text here


Scroll down to ’Github Pages’, and click on ‘Check it out here!’.



alt text here


Under source select ‘main’ and click save. Your site is now published!


alt text here


Copy the link and go back to ‘Code’ tab.


alt text here


In the ‘about’ click on setting and add your new link under ‘website’. Now you can click on that link whenever you make changes you want to see!


alt text here




You’re all done! Celebrate good times, come on!


alt text here


Note: It may take a few minutes for the codes to update, refresh your page and try the link again if no changes appear.

Further Resources


For more information about forking, visit: https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks

Guide for forking projects: http://guides.github.com/overviews/forking/

Works Cited

This code through references and cites the following sources:


github.com
desktop.github
docs.github.com/en/get-started/quickstart/fork-a-repo