A GitHub repository is a space where you can store and manage content for projects. It’s a centralized location where you can collaborate, share, and track changes to content. Each repository contains all the files, directories, and other resources that make up a project, along with the history of changes made to the project over time.
Repositories on GitHub are organized into user accounts and organizations, which are used to group related projects together. Users can create new repositories directly on GitHub, or they can clone existing repositories to their local machine and then make changes to them before pushing their changes back to the remote repository.
Another important feature of GitHub repositories is that they are public by default, meaning that anyone can view the contents of the repository and contribute to it if they have permission. However, yous can also create private repositories to keep information private or limit access to specific individuals or teams.
Important: Assume information may be exposed publicly in the future, so do not store private, protected or other regulated information in repositories on GitHub!
Step 1: Open your web browser and visit the GitHub website:
Step 2: Sign in to your GitHub account:
-
If you already have a GitHub account, click “Sign in” at the top right corner of the page and enter your username (or email address) and password.
-
If you do not have a GitHub account, start here.
Step 3: Choose a repository owner:
If you’re part of an organization on GitHub, you’ll have the option to create the repository under your personal account or under the organization. Select the appropriate owner from the “Owner” dropdown menu.
Step 4: Enter a repository name:
- Recommended first private repository name: notebook
- Recommended first public repository name: shared
Choose a name for your repository that is descriptive and easy to remember. Enter the name in the “Repository name” field. Avoid using spaces and special characters in the name.
Step 5: Add a description (optional):
You can provide a brief description of your repository in the “Description” field. This will help others understand the purpose of your repository.
Step 6: Choose the repository visibility:
Public: Anyone can view and fork your repository, but only collaborators can make changes. Private: Only you and your collaborators can view and make changes to your repository.
Step 7: Initialize the repository with a README file (optional):
You can choose to create a README file in your repository by checking the box next to “Add a README file.” The README file typically contains important information about your project, such as a description, installation instructions, and usage guidelines.
Step 8: Add a .gitignore file (optional):
You can choose to create a .gitignore file by selecting a template from the “Add .gitignore” dropdown menu. This file specifies which files or directories should be ignored by Git, such as build artifacts, log files, or user-specific configuration files.
Step 9: Add a license (optional):
You can choose to add an open-source license to your repository by selecting one from the “Add a license” dropdown menu. This will help others understand how they can use, modify, and distribute your code. You can leave this empty if it is just for your own private use.
Step 10: Click the “Create repository” button to create your new repository.
Congratulations! You’ve successfully created a new repository on GitHub. We will do more with this repository soon!