DEV Community

Cover image for Reference Guide: Create a GitHub Repository
kymiddleton
kymiddleton

Posted on • Edited on

7 4

Reference Guide: Create a GitHub Repository

Welcome to part two of my reference guide series!
Go here for Part One: Reference Guide: Common Commands for Terminal.

GitHub is a web-based hosting service for version control using Git.

To create a repository go to GitHub:

  • At the top right corner of the webpage click the + sign and select New Repository.
  • Enter a name for the repository in the provided field. Use dashes instead of spaces.
  • Select Initialize This Repository with a README file.
  • Click the arrow on Add .gitignore
    • There are some files that GitHub needs to ignore when files are pushed to the repository. For example: When working with Node.js, select Node from the list.

gitignore

  • Select Create repository

How to Protect the Master Branch:
From GitHub:

  • Select the Settings tab

settings

  • From the Options menu on the left-hand side select Branches
  • Select the Add rule box at the right-hand side of Branch protection rules

branch protection

At the top of the screen there will be a prompt to enter the branch name.

  • Apply rule to Master or branch name
  • Select the Require pull request reviews before merging
  • Select Include administrators
  • Select Create
  • Select Save changes

rule settings

Clone the Repository:
In GitHub:

  • To clone the repository, select clone to copy the link

In the Terminal:

  • Go into Terminal and use the command cd to move into the folder where the repository will be stored and accessed.
  • Once inside the file, or root directory, where the project will be stored enter the following commands.
  • git clone <paste copied link from GitHub>
    • This step creates a link between the local files and the repository files.

Stay tuned for part three: Committing Changes.

For the completed Reference Guide Series:

Tiugo image

Fast, Lean, and Fully Extensible

CKEditor 5 is built for developers who value flexibility and speed. Pick the features that matter, drop the ones that don’t and enjoy a high-performance WYSIWYG that fits into your workflow

Start now

Top comments (0)

The best way to debug slow web pages cover image

The best way to debug slow web pages

Tools like Page Speed Insights and Google Lighthouse are great for providing advice for front end performance issues. But what these tools can’t do, is evaluate performance across your entire stack of distributed services and applications.

Watch video

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay