Beginner Git Cheat Sheet

Part 1

For an entirely new repository:
1. Go to and Log in with your Username & password (or Create account if it is the first time)

2. Navigate to Repositories by clicking on the Profile drop down (on the far top right) and click on ‘Your repositories’

3. To create a new repository click on ‘New’

4. Add repository name and click on ‘Create Repository’

To create a new repository click on ‘New’
Save this page we will use it later on.

5. Now we go to our PC and set up git.

6. Download and install git from

7. Open cmd( Win + R, then type cmd, then enter) . Set up your email & username using the following commands

  • git config --global "Your Name"
  • git config --global

5. Open cmd( and navigate to the location of your project or where you want to create your project

For example, My project is located in C:Users\Abby\Documents\GitCheatSheet

6. Type in the following commands to initialize a new repository in our local PC and connect it to the online github repo we created in the earlier steps

  • git init
  • git add .
  • git commit -a -m "Your commit message"
  • git remote add origin <url>
  • git push origin master

Leave a Reply

Your email address will not be published. Required fields are marked *