Skip to content

Latest commit

 

History

History
74 lines (39 loc) · 3.56 KB

gitApple.md

File metadata and controls

74 lines (39 loc) · 3.56 KB

Installing Git and Creating Your First Repository

This tutorial is for Apple users. Windows users should use the gitWindows tutorial. Proceed in chronological order and do not deviate from the script.

Make a GitHub Account

Step 1: Go to github.com and make an account.

Step 2: Immediately proceed to your profile.

Step 3: Your profile should currently be empty of any repositories, public activity, or contributions. Do nothing and proceed to the next step.

Open Terminal

Step 4: Open the program terminal on your mac. Terminal is installed on all macs by default.

Step 5: Configure your machine to your GitHub account. You only ever need to do this once. Type the following code into bash, but substitute your GitHub account name for Kylo Ren and your email address for [email protected].

git config --global user.name "Kylo Ren"
git config --global user.email [email protected]

Creating the local copy of your repository

Your git repository exists in two places simultaneously: online at GitHub and on your machine. You need to decide where on your machine you want the local copy of the repository.

Step 6: Create the new folder for your repository wherever you choose.

Initiate git in the local repository

Step 8: Return to terminal. Use the cd command to 'change directory' to where your newly made repository is saved. If you do not know where this is, you can drag your folder into the terminal window.

My specific example is...

cd /Users/zaffos/Box\ Sync/GitRepositories/exampleRepository/

The \ is needed for directory names with spaces - e.g., Box Sync is Box\ Sync.

Your example will probably be something like

cd /Users/You/Repository/

Step 9: Initialize git using the git init command in terminal. LEAVE TERMINAL OPEN.

Creating the GitHub copy of the repository

Step 10: Return to your GitHub profile page. Click on create a new repository. Give the repository a name.

Step 11: Copy the code under the section header "...or push an existing repository from the command line" into terminal. Type it in precisely. You will be asked to enter your GitHub username and password in git bash.

The End

You now have a repository that is linked between GitHub and your local machine. To see how to add, edit, delete, or sync files between your local machine and GitHub, see the gitTutorial.