Basic Git Commands

Creating a Git Repository

  1. Right click on your project folder and click “Git Bash Here”
  2. Initialize your repository with the command “git init”
  3. Go to github.com and create a new repository
  4. Put the command “git remote add origin (link to new repository)” in Git Bash
  5. Use the command “git push -u origin master”

git init: used to create a new local Git repository, can be used on both existing projects and brand new ones

git commit -m “commit message”: adds all uncommitted files to the local commit and adds a message

git remote add origin (link to GitHub repository): connects your local repository to a remote repository hosted by GitHub instead of your computer

git push -u origin master: pushes committed files to the master branch of the remote repository

git status: shows which files have and haven’t been committed and the files that Git isn’t tracking

Images: Collage on a Theme

They say that a picture is worth a thousand words. This is why images are used often on websites. The pictures are used to help emphasize a point or help the reader visualize what the website is explaining.

In HTML, you embed images using the <img> tag with the src attribute to specify what image you want to show.

<img src=”https://upload.wikimedia.org/wikipedia/commons/5/5e/Bel_muc.jpg”>

If you add the width and height attributes, you can change the size of the image when it appears.

<img src=”https://upload.wikimedia.org/wikipedia/commons/5/5e/Bel_muc.jpg” width=”150px” height=”150px”>

The width and height attributes let you decide how big you want your image to be and lets you stop it from being too big or too small.

DestinationsGoneWrong Gone Right

Dream Vacation Destinations

  • France
    • Eiffel Tower
    • Arc of Triumph
  • Germany
    • Berlin Wall Memorial
  • Japan
    • Tokyo
    • Kyoto
  • Canada
    • British Colombia
    • Prince Edward Island
  • Ukraine
    • Chernobyl Exclusion Zone
    • Pripyat

The problem with the page DestinationsGoneWrong.html was that all of the <ol> and </ol> tags should have been <ul> and </ul> tags respectively and that a </li> tag was placed on the same line as the list item “France” when it should have been placed on the line after the </ul> tag after the list item “Arc of Triumph”.

The first thing I did to fix the document was to change all of the <ol> tags to <ul> tags. The next thing I did was move the </ul> tag after the list item “France” onto its own line after the </ul> tag after the list item “Arc of Triumph”.

I thought I would have to make the same changes to every line with a country name, but fixing France’s section fixed the whole document.