Git Product home page Git Product logo

first-lab-online-web-pt-092418's Introduction

Your First Lab

On Learn, labs are exercises you have to complete.

The goal of this lab is to practice the workflow required to complete a lab and make sure that you can make a new file using the terminal.

To complete this lab you will have to:

  1. Fork the lab via github.
  2. Clone your fork.
  3. Solve the lab
  4. Commit your changes
  5. Push the changes to your fork.
  6. Open a Pull Request from your fork.

1. Forking from Github

Forking is the process of making your personal copy of the Learn lab on GitHub.

Git Workflow 1

To get started, in Learn click the GitHub button to go to Flatiron School's copy of the lab on Github.

Ironboard Labs Step 0

Next on Flatiron's Github page for the lab click the Fork button.

Ironboard Labs Step 1

Then select your personal Github account as the location to fork to.

Ironboard Labs Step 1B

2. Clone Your Fork

Cloning is the process of making a local copy of the lab from your fork on Github.

Git Workflow 2

To clone, make sure you've first clicked on the SSH link, then click the copy button next to the Clone URL to copy it to your clipboard.

Ironboard Labs Step 2

Next, in Terminal navigate to the parent directory where you would like to place this lab. Then type: git clone <paste the clone URL here>

Note: You should replace the <paste the clone URL here> including the < and > symbols in the snippet above with your actual clone URL by pressing command+v on mac or ctrl+v on windows. Example: git clone [email protected]:jongrover/first-lab-000.git

Ironboard Labs Step 2b

3. Solving this Lab

Git Workflow 3

Now that you have forked and cloned your fork, your goal is simple. Just create a new file within this lab.

Go into this lab's directory by typing cd LABNAME (where "LABNAME" is the name of your version of this lab โ€” we might type, e.g. cd first-lab-000). Confirm that your working directory in terminal is this lab by typing: pwd

You should see something like: /Users/avi/first-lab-000

1

Now, try to run the learn CLI by typing learn in the lesson's directory. You'll see output similar to this, with failing tests (that's fine, don't panic).

Failing Tests

  1. Create a file and name it: 'my-new-file.txt'.

touch my-new-file.txt

  1. Once you've done that, run learn on your terminal, which will run one test that's in the spec/ folder. This test is looking to see that you've added this new file. If you have the test passing on your computer, you should see something like this on Learn, indicating the local build is passing:

Passing Tests

  1. Add the new file to the staging area.

git add my-new-file.txt

1

  1. Commit the file.

git commit -m "My first commit"

1

4. Push Your Code to GitHub

Git Workflow 4

After adding and commiting your most recent work next we want to push our work up to our personal fork on GitHub.

git push

1

Go to GitHub and confirm the push.

1

5. Opening a Pull Request

Submitting a Pull Request is the process of Requesting that the maintainer of the original Learn lab to consider Pulling (fetching & merging) in your work from your fork on GitHub. This also enables Learn.co to see your solution for the lab.

Git Workflow 5

To do this, in Learn click on the title of the lab to go to your fork on GitHub.

Ironboard Labs Step 0b

Then click the green Pull Request button.

Ironboard Labs Step 4

After reviewing the comparison code and making sure it shows your solution, click the Create pull request button.

Ironboard Labs Step 4e

Then click Create pull request button again.

Ironboard Labs Step 4f

That's it, you're done! Now go back to Learn and you should see the Pull Request flip to green, and the remote build will be kicked off. Once it passes, you will be able to proceed to the Next Lesson.

View Your First Lab on Learn.co and start learning to code for free.

first-lab-online-web-pt-092418's People

Contributors

aviflombaum avatar ahimmelstoss avatar mendelb avatar pletcher avatar fs-lms-test-bot avatar matbalez avatar peterbell avatar arelenglish avatar deniznida avatar jmburges avatar sarogers avatar fislabstest avatar

Watchers

 avatar James Cloos avatar  avatar Victoria Thevenot avatar  avatar Joe Cardarelli avatar Sam Birk avatar Sara Tibbetts avatar  avatar Sophie DeBenedetto avatar  avatar Antoin avatar Alex Griffith avatar  avatar Amanda D'Avria avatar  avatar A. Perez avatar Nicole Kroese  avatar  avatar Lore Dirick avatar Nicolas Marcora avatar Lisa Jiang avatar  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.