My first repository, albeit a simple one (mostly to test waters).
Essentially,
-
Create a repository on GitHub (do not initialize with a README quite yet.)
-
Open Terminal and navigate to the working directory of the project you would like to add.
-
Initialize the local directory as a Git repository.
git init
-
Add the files in the local repository - this gets the ready for the first commit.
git add .
-
Commit the files that you've staged. This commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "YOUR COMMENT HERE"
-
At your GitHub repository's page, copy the remote repository URL.
-
In Terminal, add the URL for the remote repository where the local repository will be pushed.
git remote add origin REMOTE REPOSITORY URL
-
Push the changes in the local repository to GitHub.
git push origin master