Giter Site home page Giter Site logo

hs-git-website-lab's Introduction

##Personal Website Lab

  • First things first, click on the fork icon at the top of the page, then fork this lab by clicking the "Fork" button in the top right corner.

  • A copy of this lab now exists on your github account, but we need to clone the project to get it on your computer.

  • In the right navigation bar you should see something that says SSH clone URL and a link that starts with git@github... (if you don't see this you should click on the blue SSH link). You'll need that git@github link for the following command in your terminal:

git clone [email protected]:<your username>/hs-git-website-lab.git

  • This will create a copy of the lab locally on your computer.

  • Now that we have a local copy, we can cd into the project cd hs-git-website-lab and begin working on the lab!

  • Let's make an index.html page for our site in this directory and open it up in Sublime Text.

  • Now let's add some basic html. You can copy and paste this code into your index.html file:

<html>
  <head>
  <title> My Site </title>
  </head>
  <body>
    <h1> My Site </h1>
    <img src="http://i.telegraph.co.uk/multimedia/archive/01455/cat_1455103c.jpg"></img>
  </body>
</html>
  • Let's see if git noticed that we added a file and made changes to it. Remember how to do that?

  • We're finished with that part for now, so add and commit. Don't forget your commit message!

  • Now let's push up our files to Github.com, so everyone can see what we've been working on, and if anything ever happens to our computers, our code is still accessible.

  • First use git remote -v in the command line to make sure that the link to your github repo is set up properly. You should see [email protected]:<your username>/hs-git-website-lab.git.

  • Do you see that? Great! Go ahead and push up to your fork.

  • Now let's do some work on the header. We don't want to do work on the master branch though, right? Go ahead and create a new header branch and move to that branch.

  • Before we get started working let's take a look at index.html in our browser. You can open it up in your browser by typing open index.html from the command line.

  • You should see 'My Site' for now, but let's make the site your own! Replace 'My Site' in the <title> and <h1>, tags with your name.

  • Refresh the page in your browser. Do you see your name?

  • We eventually want to add a sub-header and a description, but we don't have enough time right now. We want to save our work though, so go ahead and add and commit these changes.

  • Now let's go back to master branch and open index.html. You'll notice your name no longer appears in the browser. Those changes only exist on the header branch. To see those changes on the master branch we need to merge the header branch into the master branch. Do that now.

Now if we reload index.html in the browser, you should see your name in the header.

Great job!

Wrapping up

Now that you completed the lab, make sure all your code is pushed up to your fork of the repository on Github. After that, we're going to create a pull request. A pull request is best practice for submitting contributions to an open source project. This is also how we'll be able to review your work and give you feedback on your code.

  • To create a pull request, go to your fork on the github website.

  • Click the green button in the top left corner.

  • On the next page, enter a comment for the pull request, like "completed lab" and click submit.

View Personal Website Lab on Learn.co and start learning to code for free.

hs-git-website-lab's People

Contributors

fislabstest avatar fs-lms-test-bot avatar vanessadean avatar victhevenot avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.