Github is where you'll host all your projects publically. It's the platform we'll use to write and share applications, and it allows us to work on these projects in parallel. It will make it easier for me to help you, since all your code is availabe for me to oversee online.
Navigate to the directory where you'd like to keep all your projects. The commands below will download the boilerplate code and prepare it for development. Anytime you see <project_name>
, replace it with whatever name you're like to give the project (no spaces!).
git clone https://github.com/Zsailer/d3app <project_name>
cd <project_name>
git submodule init
git submodule update
git remote rm origin
Now we need to create a repository on Github for hosting this project.
- Go to Github
- Click on the "+ New repository" button.
- Name the repository the same as your
<project_name>
- In Description, write a short description of the application you're writing.
- Make sure the Public bubble is selected.
- Do not initialize this repository with a README.
- No
.gitignore
orlicence
is necessary. - Click Create repository
- Once the repo is created, copy it's URL.
Go back to the command-line in the directory of your <project_name>
, and enter the following commands, replacing <project-url>
with the URL you copied from Github.
git remote add origin <project-url>
git push origin master
After you've made some changes to the code, you'll want to update the Github repo with these changes. This is known as committing your changes. We need to let Git know what changes we'd like to commit.
To see what files you've changed, type on the commandline:
git status
You'll see all files that have changes. Some might be listed as untracked files. For now, we'll tell Git that we want all files to be committed. For each file path, use the following command to add these changes (don't forget to put the file path in quotes).
git add "<file-path>"
Once you've done this for all files, type the following command with a message in quotes
git commit -m "some SHORT message describing the changes you made"
git push origin master
That's it! This will set you up on Github and allow you to begin sharing projects immediately.