Giter VIP home page Giter VIP logo

first-lab-ios-0615-public's Introduction

tags languages
git, github, bash, command line, learn.co, tutorial
bash

Your First Lab

On Learn, labs are exercises you have to complete.

The goal of this lab is to practice the workflow to complete a lab and to see if you can make a new file or directory using terminal.

Make sure you accept the invite on Github to the learn.co student organization

To complete this lab you will have to:

  1. Fork the lab via github.
  2. Clone your fork.
  3. Create a new file.
  4. Commit that file.
  5. Push that commit to your fork.
  6. Open a Pull Request for your fork.

Your first step is to scroll down to the bottom of the page, which will direct you to the lab on Github. You should see something like this:

Learn

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

On Learn

You should see something like this, once you've forked the repository:

Learn.co 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

Solving this Lab

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

  1. You should be cd'd into this lab's directory. Confirm that your working directory in terminal is this lab: pwd

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

1

  1. Simply create a file. It doesn't matter what you call it.

touch my-new-file.txt

1

  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 a 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:

Local Build

  1. Add it to the repo, staging it for commit.

git add my-new-file.txt

1

  1. 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 that to your fork, up to github.

git push origin master

1

  1. Go to github and confirm the push.

1

Opening a Pull Request

Open the lab in github (the end of step 7 above).

  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

  1. Look on Learn again and you should see a confirmation of that pull request being opened and a remote build passing:

PR & Remote Build

first-lab-ios-0615-public's People

Contributors

aviflombaum avatar ahimmelstoss avatar arelenglish avatar leojkwan 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.