Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Once you have your repository set up on GitHub, you’ll get a set of instructions on the next screen that walks you through the commands you need to create a local repository on your computer. This will help you set up Git so that your code can synchronize between your local and remote repositories.
To create your local repository, you want to start by going into the folder that holds your Drupal installation. This, as we may recall, is done using the following:
cd ~/path/to/d7-demo
Once you’re there, use the following commands to start a local repository, make your first commit, add a remote repository, and push your files to the remote repository.
git init
git add -A
git commit -m "first commit"
git remote add origin git@github.com:USERNAME/REPOSITORY-NAME.git
git push origin master
Do all of those things in Terminal.app, using the values for your
GitHub account name and the name of your repository. Once you’ve created
your remote Origin, use the git pull command to pull down the changes on the
remote server each time you start doing work, and use git push to push the changes back once you’re
done.