Giter Site home page Giter Site logo

forks-and-clones-readme-v-000's Introduction

Forks and Clones

Objectives

  1. Fork a repo
  2. Clone a repo
  3. Push to different remote repos

##Forking a GitHub Repository Forking a GitHub repository is just a way to create your own copy of it. We do this all the time while using Learn. Every time you fork a lab, GitHub creates a copy that you can use as a sandbox to play around, all while maintaining a canonical repo where the original lab remains intact. In other words, forking creates another remote that allows you to work in your own world without messing with the core learn-co-students content.

Fork Button

You can fork any repo by clicking the "Fork" button at the top right of any GitHub repository. Learn also makes it easy by allowing you to click the "OPEN" button at the top of any lab (if you use the Learn IDE) or to simply type learn open in your terminal (if you use a local development environment). It's also worthwhile to note that you can go to your fork of a given lab by changing the "learn-co-students" bit of the GitHub URL to your GitHub username. For example:

https://github.com/learn-co-students/first-lab-001-prework-web

Change "learn-co-students" to your username:

https://github.com/your-username-here/first-lab-001-prework-web

More on forking in the GitHub docs.

##Cloning Now we want to get our forked copy of the repository on our local machine. This is where cloning is useful. To do this:

  1. Navigate to your forked repo on GitHub.

  2. Make sure you select SSH as your URL type.

    SSH URL

  3. Click the "Copy to clipboard" button (highlighted below). This will copy the URL for us to use when we clone.

    Clone Repo Button

  4. In the terminal, run the git clone command. It takes the URL we just copied as an argument:

    git clone your-copied-github-url

    This will create a local copy of our forked GitHub repository.

View Forks and Clones on Learn.co and start learning to code for free.

forks-and-clones-readme-v-000's People

Contributors

joshuabamboo avatar annjohn avatar pletcher avatar lawrend avatar gj avatar victhevenot avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.