How does GitHub work?
- allows users to "push" and "pull" their local repositories to and from remote repositories on the web
- provides users with a homepage that displays their public repositories
- users' repositories are backed up on the GitHub server in case something happens to the local copies
- social aspect allows users to follow one another and share projects
Set up a GitHub account using the same e-mail you configured in Git on your computer.
Your GitHub profile:
- is where all your activity on GitHub is displayed
- allows you to show other people who you are and what you are working on
- becomes a portfolio of your work as you work on more and more projects
Git vs. GitHub
- You don't need GitHub to use Git
- Git is local (on your computer), GitHub is remote (on the web)
Creating a GitHub repository (repo)
Two ways:
- Start a repo from scratch
- Fork another user's repo
Creating a Local Repo
- Create and navigate to a directory.
- Initialize a local Git repo using git init
- Point your local repo at the remote repo on GitHub using git remote add origin
Cloning a Forked Repo
- Create and navigate to a directory on your local machine.
- Type git clone url