git init
will initialize a new local git repository in your project folder.
If you have a remote repository (at GitHub) and want to work with its content in your computer, you have to use the command git clone <url_of_the_github_repository_extension_dot_git>
.
ie: git clone https://github.com/username/repo_name.git
After clone the remote repository into your computer, you will have a local repository connected with the remote cloned repository and then you can start to change the local repository and push your changes to the remote repository.
To save your changes in you local repository you can use the script below:
git add .
git commit -m "a message to describe your commit"
To send the changes saved locally to your remote repository you need to execute the command below:
git push origin master
This is the simplest flow to work with a remote GitHub repo in your computer.