War Project – Going Online

This is a review lesson. You’ve done this before. But now would be a good time to do it again.

Part 1

Open your Git command line box.

Type cd documents. CD means change directory. We are telling it to open the documents folder by telling it to change to the documents directory. You can only tell it to open a folder within the current directory.

You’ll need to find and follow the file path that will lead to where you saved your war game folder. Mine is in documents/projects/war.

You can type in LS and hit enter to see a list of what files and folders are in the current directory. You can type cd ../ to go back up one level in the directory. Make sure you end in your war folder.

Type git init to initialize, create, a git folder inside the war directory.

Type git add .  That takes everything in your war directory and gets it ready to go online.

Type in git commit -m “Create page.”

Part 2

Go to github.com and create a new repository. Call it something like “war.”

Scroll down and look for the “push” commands.

Type in what’s there.

git remote add origin https://github.com/AllinOneHomeschool/firstProject.git

Make sure you type it exactly. If you mess up, you can search how to fix it, or delete your repository and git folder and start fresh.

Then type the final line there.  git push -u origin master

Push is the command that takes the files from the directory on your computer and puts it in the online repository. Click on your repository name on GitHub and click on Settings toward the top of the page. Scroll down to GitHub Pages. Under Source there is a button that says None. Click on that and choose Master Branch and save. Scroll back down to the same place and your url, your link will be there. Give it a few minutes before you check to see if it’s there.

You can watch this lesson.