Skip to content

learn-co-curriculum/hs-github-fork-clone-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forking and Cloning Labs from Github

Forking from Github

Forking is a feature of github that creates a copy of a repository on your account. When you solve a lab, you'll be coding the solution not on the deployed copy of the lab that everyone has access too, but rather, on your copy, your fork.

How to Fork

  1. Click on the Fork Button

Clicking on Fork

  1. Fork it to your personal github account.

Forking

  1. Make sure you are on your fork of the lab.

Your Fork

Cloning from Github

Cloning means bringing down a copy of a git repository from a remote source (like Github). It is creating another copy of a repository on your computer and allowing your local copy to communicate and update the copy on github.

How to Clone

  1. Copy your Clone URL, it should start with https://

Your Fork Clone URL

  1. From your terminal, from your home directory (you can cd ~ to quickly jump there), type in: git clone and then paste the clone address you copied in step 1.

git clone

  1. Enter in your github credentials.

github authentication

Note: If you have 2-factor-authentication on github turned on this won't work. Turn it off from your settings

  1. Your clone should now exist in a new directory named after the lab.

All good

  1. cd into the lab directory so you can get to work!

All good

Posting Your Work on Github

After you've completed a lab post your work onto github with the following steps.

  1. Stage your changes for commit with

git add .

  1. And confirm that the file is staged for commit with git status

1

  1. Commit the file.

git commit -am "My first commit"

1

  1. Push your work up to your fork on github.

git push

1

  1. Go to github and confirm the push.

1

Opening a Pull Request

  1. Click on the branch comparison icon from the repository home.

1

  1. Click Create Pull Request

1

  1. Confirm the Create Pull Request

1

View Forking and Cloning Labs from Github on Learn.co and start learning to code for free.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages