GitHub
GitHub is a website that stores Git repositories on the internet to facilitate the collaboration that Git allows for. We will be using GitHub in this class. If you don't already have an account, please make one by visiting github.com
Please use this survey form to let us know what your GitHub username is. We need it to setup repositories for your homework and project.
Let's put our repository 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 GitHub 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/cs421sp21/class-search-app.git
git branch -M main
git push -u origin main
Run the above commands (but use the ones generated for your repository) in the terminal.
Next, refresh the page on GitHub. You must see the content of class-search-app
folder uploaded to your GitHub 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.