
Author: Ridotshila Mambeda
Date: 30 April 2024
Table of Content
- Introduction
- Getting Started
- Profile
- Managing Repositories
Overview of Github
what is GitHub?

GitHub is a website and cloud-based service that helps developers store and manage their code, as well as track and control changes to their code.
What is gitHub used for?
GitHub serves various purposes, catering to the needs of developers, teams, and communities in diverse ways:
- Version Control: GitHub is primarily used for version control, allowing developers to manage changes to their codebase over time. It provides a platform for creating and organizing snapshots of code (commits), branching for feature development or bug fixes, and merging changes back into the main codebase.
- Collaboration: GitHub facilitates seamless collaboration among team members, regardless of their location. Features such as pull requests, issues, and project boards enable communication, code review, and task management, fostering efficient teamwork.
- Project Hosting: GitHub offers a hosting service for Git repositories, enabling developers to store their code and project files in a centralized location accessible from anywhere with an internet connection. This makes it easy to share projects with collaborators, contribute to open-source projects, and showcase work to potential employers or clients.
- Open Source Community: GitHub hosts millions of open-source projects, serving as a hub for collaboration and knowledge sharing within the global developer community. Developers can contribute to open-source projects, learn from others' code, and build upon existing solutions to create new ones.
- Continuous Integration and Deployment (CI/CD): GitHub integrates with various CI/CD services, enabling developers to automate the testing, building, and deployment of their projects. This streamlines the development process, improves code quality, and accelerates the delivery of new features and updates.
- Documentation and Wikis: GitHub provides tools for creating and hosting project documentation using Markdown. This makes it easy to maintain comprehensive documentation alongside the codebase, ensuring that developers and users have access to up-to-date information about the project.
- Learning and Education: GitHub serves as a valuable resource for learning and education, offering tutorials, documentation, and a wealth of open-source projects that developers can study and contribute to. It provides a platform for collaboration among students, educators, and professionals, fostering a culture of continuous learning and skill development.
- Portfolio Showcase: GitHub allows developers to showcase their work by hosting their projects on their profile. This helps in demonstrating skills, contributions to open-source projects, and coding abilities to potential employers or clients.

Key Concept on GitHub
1. Version Control:
Version control is a system that records changes to files over time. It allows developers to track modifications to their codebase, revert to previous versions if needed, and collaborate with others seamlessly.
2. Repositories:
A repository, often abbreviated as "repo," is a central location where files and folders related to a project are stored. It contains all the project's files, along with metadata such as commit history and branches. Repositories on GitHub can be public or private, depending on whether they are accessible to the public or restricted to specific collaborators.
3. Pull Requests:
A pull request (PR) is a mechanism for proposing changes to a repository on GitHub. It allows developers to notify others about changes they've made, request feedback, and merge their changes into the main codebase. Pull requests typically include a comparison of the changes made (diff), a description of the proposed changes, and any relevant discussion or comments. They serve as a way to review, discuss, and collaborate on code before integrating it into the main branch.
Getting Started
Creating a GitHub account
Setting up a GitHub account is a straightforward process. Here's a step-by-step guide to help you get started:
Step 1: Visit GitHub: Open your web browser and go to https://github.com/

Step 2: Sign Up: On the GitHub homepage, you'll find a "Sign Up" section. Enter yourdesired username, a valid email address, and a secure password. Then, click on the green "Sign up for GitHub" button.

Step 3: Verify Your Email: GitHub will send a verification email to the email address you provided during sign-up. Check your email inbox for a message from GitHub and click on the verification link to confirm your email address.

Step 4: choose how many members will be working with you, e.g. Just me then continue.

Step 5: choose the specific features that you are interested in using then continue.

Step 6: Choose a Plan: GitHub offers different plans, including a free plan for individual developers and paid plans with additional features for businesses and organizations. Select the plan that best suits your needs, then click on the "Continue" button.

Step 7: Explore GitHub: Once your account is set up, take some time to explore GitHub's features and resources. You can search for projects, join communities, and start contributing to open-source projects right away

Setting up Git
Setting up Git and configuring it with your GitHub credentials involves several steps. Here's a basic guide to get you started:
- Install Git:
- Go to the Git website and download the appropriate installer for your operating system (Windows, macOS, or Linux).
- Run the installer and follow the installation instructions. Make sure to select options that fit your preferences, such as choosing the default text editor and adjusting PATH environment settings (usually, the default options work fine).
- Configure Git:
- Once Git is installed, open a terminal or command prompt.
- Set your username and email address. This information will be associated with your commits.
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
- Authenticate with GitHub:
- If you're using HTTPS, Git will prompt you for your GitHub username and password the first time you interact with GitHub. Alternatively, you can use a Personal Access Token (PAT) instead of your password for increased security. You can generate a PAT in your GitHub account settings under "Developer settings" > "Personal access tokens."
- If you're using SSH, Git will automatically use your SSH key for authentication, and you won't need to enter your credentials each time.
- Verify Configuration:
- To verify that Git is configured correctly, you can run:
git config --global --list
- This command will display your Git configuration, including your username and email address.

Setting up your Profile
Your profile tells people who you are and what you're interested in.
About your profile
Your profile page on GitHub is a place where people can find out more about you. You can use your profile to:
- Share your interests and skills.
- Showcase your projects and contributions.
- Express your identity and show the GitHub community who you are.
You'll learn how to personalize your profile by adding a profile picture, bio, and a profile README.
Prerequisites
You must have a GitHub account. For more information, see "Installation Page."
Adding a profile picture and bio
Adding a profile picture
-
In the upper-right corner of any page, click your existing profile avatar, then, from the dropdown menu, click Settings.

-
Scroll down, under "Profile Picture", select Edit, then click Upload a photo....

-
Select an image, then click Upload. Crop your picture. Click Set new profile picture.

Next, we'll add some basic information about yourself to share with other GitHub users. This information will display below your profile picture on your profile page.
Adding a bio
- On your profile page, under your profile picture, click Edit profile.

- Under "Bio", write one or two sentences about yourself, such as who you are and what you do.
- To add an emoji to your bio, visit "Emoji cheat sheet" and copy and paste an emoji into the "Bio" dialog box.
- Optionally, add your preferred pronouns, workplace, location and timezone, and any links to your personal website and social accounts. Your pronouns will only be visible to users that are signed in to GitHub.
- Click Save.
Adding a profile README
Next, we'll create a special repository and README file that will be displayed directly on your profile page.
Your profile README contains information such as your interests, skills, and background, and it can be a great way to introduce yourself to other people on GitHub and showcase your work.
Step 1: Create a new repository for your profile README
- In the upper-right corner of any page, select "+", then click New repository.

-
Under "Repository name", type a repository name that matches your GitHub username. For example, if your username is "octocat", the repository name must be "octocat".
-
Optionally, in the "Description" field, type a description of your repository. For example, "My personal repository."
-
Select Public.
-
Select Initialize this repository with a README.
-
Click Create repository.
Step 2: Edit the README.md file
- Click the edit next to your profile README.

-
In the "Edit" view, you'll see some pre-populated text to get you started. On line 1, delete the text that says ### Hi there and type # About me.
-
Toggle to "Preview" to see how the plain text now renders. You should see the new text displayed as a much larger heading.

-
Toggle back to the "Edit" view.
-
Delete line 3 and line 16.
-
Complete some of the prompts on lines 8 to 15, and delete any lines you don't want. For example, add your interests, skills, hobbies, or a fun fact about yourself.
-
Now, toggle to "Preview". You should see your completed prompts render as a bulleted list.
-
Toggle back to "Edit" and remove any other lines of text that you don't want displayed on your profile.
-
Keep customizing and editing your profile README.
Step 3: Publish your changes to your profile
-
When you're happy with how your profile README looks in "Preview", and you're ready to publish it, click Commit changes...
-
In the open dialog box, simply click again Commit changes.
-
Navigate back to your profile page. You will see your new profile README displayed on your profile.
Managing Repositories
Creating Repository
Creating a repository on GitHub is straightforward. Here's a step-by-step guide:
- Sign in to GitHub:
- Open your web browser and go to github.com.
- Sign in to your GitHub account if you haven't already.
- Navigate to Your Dashboard:
- Once logged in, you'll be taken to your GitHub dashboard.
- Click on the "+" icon in the top-right corner of the page.
- Select "New Repository": From the dropdown menu, select "New repository".
- Fill Out the Repository Details: On the "Create a new repository" page, you'll need to fill out some details:
- Repository name: Choose a name for your repository. This will also form part of the URL (e.g., https://github.com/your-username/repository-name).
-
Click "Create Repository": Once you've filled out the necessary details, click the green "Create repository" button at the bottom of the page.
-
Congratulations, Your Repository is Created: Your new repository is now created on GitHub! You'll be redirected to the repository page where you can find the repository URL, clone the repository to your local machine, and start adding files.
-
Add Files and Start Coding: Now that your repository is set up, you can start adding files, writing code, and collaborating with others! Creating a repository on GitHub is a fundamental step in managing your projects and collaborating with others. Whether you're working on open-source projects or private projects, GitHub provides a robust platform for version control and collaboration.
Cloning Repository
To clone a repository from GitHub onto your local machine, follow these steps:
-
Find the Repository on GitHub: Navigate to the GitHub repository you want to clone using your web browser.
-
Get the Repository URL: Click on the green "Code" button located on the right-hand side of the repository page. Copy the URL provided. You can choose between HTTPS or SSH. If you're not sure which one to use, HTTPS is generally easier for beginners.
-
Open Your Terminal or Command Prompt:
- Open your terminal or command prompt on your local machine.
- Navigate to the Directory Where You Want to Clone the Repository: Use the cd command to navigate to the directory where you want the cloned repository to be stored.
- For example, to navigate to your desktop, you might use: "cd Desktop"
- Clone the Repository:
- Once you're in the desired directory, use the git clone command followed by the repository URL you copied earlier. "git clone https://github.com/username/repository.git" Replace username with the GitHub username of the repository owner, and repository with the name of the repository.
- Verify the Cloning Process:
- Once you've entered the git clone command, Git will start cloning the repository onto your computer.
- You'll see a progress indicator showing the download progress.
- When the cloning process is complete, you'll see a message indicating that the repository has been cloned successfully.

-
Navigate into the Cloned Repository: Use the cd command to navigate into the cloned repository's directory. For example: "cd repository"
-
Verify the Cloned Files: Once you're inside the cloned repository's directory, you can verify that all the files and directories from the GitHub repository have been successfully cloned onto your computer.
Managing Repository Settings

Managing repository settings on GitHub allows you to configure various aspects of your repository, including visibility, permissions, branch protection, and integrations. Here's how to manage repository settings step by step:
-
Navigate to Repository Settings: Open your web browser and go to the GitHub website. Log in to your GitHub account if you haven't already. Navigate to the repository whose settings you want to manage.
-
Access Repository Settings: Once you're on the repository page, click on the "Settings" tab located near the top-right corner of the page.
-
Configure Repository Settings: You'll see a list of settings categories on the left-hand side of the page. Click on each category to view and configure the settings within.
Common Repository Settings to Configure:
- General Settings: Repository name: Change the name of your repository. Repository description: Add or update the description of your repository. Repository visibility: Choose whether your repository should be public (visible to everyone) or private (accessible only to you and collaborators you invite). Default branch: Set the default branch for your repository.
- Collaborators: Manage access permissions for collaborators: Add or remove collaborators and assign different permission levels (e.g., read-only or read/write access).
- Branches: Configure branch protection rules: Specify which branches should be protected, and set rules such as requiring pull request reviews, status checks, and branch restrictions.
- Webhooks & Services: Integrate third-party services: Set up webhooks to trigger actions in external services (e.g., CI/CD pipelines) when certain events occur in your repository.
- Secrets: Manage repository secrets: Add encrypted secrets that can be used in GitHub Actions workflows to authenticate with external services or store sensitive information.
- Actions: Configure GitHub Actions settings: Enable or disable GitHub Actions workflows for your repository and specify workflow permissions.
- Pages: Set up GitHub Pages: Configure settings for hosting a static website from your repository using GitHub Pages.
- Advanced Settings: Additional advanced settings: Customize repository settings related to transfer restrictions, archived status, and GitHub Pages source.
- Save Changes: After configuring the desired settings, scroll down to the bottom of the page and click the "Save changes" button to apply your changes.