Describe in your own words how to establish a connection between a local repository and a remote repository on GitHub.
-
Create a directory and add files
-
git init
to intialize a Git repo on that directory -
git add
andgit commit
changes -
Create a GitHub repository
- make sure it is not a "README"
- make sure SSH is selected instead of HTTP
-
git remote add origin [email protected]:USERNAME/REPO_NAME.git
to connect the local repo to the remote repo -
git push -u origin main
to send the current version of the project to the remote repository and sets "main" as the branch where work gets sent