Step 8

GitHub

Let's put our SleepTime App on GitHub for the world to see! Go to GitHub, login, and then create a new repository:

Once the repository is created, GitHub provides a few useful suggestions to start working with it.

Since we already have a local repository, we follow the instructions for "...or push an existing repository from the command line." For the repository I've created, this is the command I must use (the GitHub repo URL will be different for you):

git remote add origin https://github.com/cs280fall20/sleeptime-app.git
git branch -M master
git push -u origin master

Run the above commands (but use the ones generated for your repository) in the terminal. Make sure your current working directory is the sleeptime-git folder.

Next, refresh the page on GitHub. You must see the content of sleeptime-git folder uploaded to your GitHub repository.

Notice how GitHub automatically loads the content of README.md as the description of your repository.

In your GitHub repository, you can click on any of the files to open it. There is even a built-in editor.

Moreover, there is a list of all commits (similar to git log but fancier!).

In the view above, you can click on any commit to see a list of diffs associated with it.