Understanding the Basics of GitHub: An Introduction for Beginners

Table of content

Introduction.
What is GitHub?
Why Git?
Git vs. GitHub.
Clone (How to clone from GitHub).
Commits (How to do a commit).
Pull request (How to do a pull request).
GitHub Desktop vs. GitHub CLI.
Conclusion.

Introduct…


This content originally appeared on DEV Community and was authored by Nwankwo Victor Uzoma

Table of content

  1. Introduction.
  2. What is GitHub?
  3. Why Git?
  4. Git vs. GitHub.
  5. Clone (How to clone from GitHub).
  6. Commits (How to do a commit).
  7. Pull request (How to do a pull request).
  8. GitHub Desktop vs. GitHub CLI.
  9. Conclusion.

Introduction

GitHub is a website used to store Git repositories(folders). GitHub is a very important tool for developers, software engineers, and technical writers. It is extremely important to learn how Git and GitHub work. Git typically keeps files locally on your computer, but GitHub enables you to have a web-based folder for your files and version history.

What is GitHub?

GitHub is an online platform for storing, managing, and working together on software projects. With the help of this, you can work from anywhere in the world. It is used to communicate with version control software like Git.

Why Git?

  • Git is a distributed version control system.
  • Git performance is strong and reliable.
  • Git is secured.
  • Git is flexible.
  • Git is widely accepted.

Git vs GitHub

You now know what Git and GitHub are used for. Let's examine some of their main distinctions.

Basis Git GitHub
Introduction Git was first introduced in April 2005. GitHub was first introduced in October 2007. The site was later developed in April 2008.
Ownership Git is maintained by Linux. GitHub is maintained by Microsoft.
Application Git is a command line tool. GitHub has a graphical user interface (GUI).
Storage Git is installed locally on your system for use and does not require the internet. GitHub can be accessed on the web. It needs an internet connection.

For more information, see Git vs GitHub.

Clone

On GitHub, the process of cloning involves downloading and copying the codes and files present from the repository. In computing, a repository, or "repo", as defined by the Oxford dictionary, is a central location where data is stored. In other words, it is a folder where data/files are stored.

You should be familiar with some of the fundamental Git commands before we begin. To learn about the various Git commands, see Introduction to basic command line.

Please note that I'll be working with the Windows Operating System for the entire process.

Now, to clone a repo in GitHub, use the following order:

  1. Head over to your GitHub profile.
  2. Click the new icon. Step 1-Cloning
  3. Name your repo. You can use the name "GitHub". Step 2-Cloning
  4. Add a Readme.md file and create. Step 3-Cloning
  5. Click the code icon, and copy the URL. Step 4-Cloning
  6. Now, head over to your terminal. To locate your terminal on Windows, go to your search bar, type "bash" and click "Open." Step 5-Cloning Now, use the command git clone [paste the URL here] .
  7. Finally, navigate into the folder using the command cd [folder name] . In our case, it is cd github .

You have successfully cloned the repository.

Commits

Commits are safe points. Adding commits records your progress and changes as you work.
To do a commit, use the following order:

  1. Stage the files you want to commit. Staging files gives Git permission to track your files. To stage a single file, use the command git add [file name] . To stage multiple files, use the command git add . or git add --all .
    • To add a single file. Step-1 staging files for commits
    • To add multiple files. staging files for commits alternative
  2. Commit the file/files. To commit, use the command git commit -m "This is for messages" . The -m "Adds a descriptive message" .

step-2 commits
Your output is similar to this:

successful commit result

Your file or files have been successfully committed.

Pull request

A pull request is a way to contribute to or collaborate on a project.

To do a pull request in GitHub, use the following order:

  1. Fork the repo you want to make changes to. A fork is a copy of a repo. step-1 pull request
  2. Create fork. step-2 pull request
  3. Click the code icon, copy the URL, and head over to your terminal to clone it. step-3 pull request
  4. In your terminal, use the command git clone [paste URL here] . Click Enter. Your output is similar to this: successful clone result
  5. Navigate into the repository directory. Use the command

    cd [Directory name]

  6. Go to the project you wish to make changes to.

  7. Save your changes, add them to the staging area, and commit. To add to the staging area, use the command

    git add .

    . To commit, use the commmand

    git command -m ""

    Leave a descriptive message about the changes between the quotation marks. Click Enter.

  8. Push your changes back to the main branch. Use the command

    git push origin main

    Click Enter. Your output is similar to this:
    pushing changes from clone to main branch

  9. Return to your GitHub account to verify the changes in the forked repo.

  10. Click pull requests > New pull request.
    making a pull request

  11. Click create pull request.
    creating the pull request

  12. Finally, leave a comment and create pull request.
    final pull request procedure

And your pull request was successfully created.

GitHub Desktop vs. GitHub CLI

S/N GitHub Desktop GitHub CLI
1. It is easy to use. It is more complicated for beginners.
2. There's no need to write commands. It has a specific button for every git command. There's need to write commands.
3. It is efficient. It is faster and more efficient.

Conclusion

Learning to use Git and GitHub can be overwhelming. It is, however, a very rewarding skill. This article's goal is to make GitHub and the Git concept more clear to you. Now, it is time to explore these things yourself. All the best!


This content originally appeared on DEV Community and was authored by Nwankwo Victor Uzoma


Print Share Comment Cite Upload Translate Updates
APA

Nwankwo Victor Uzoma | Sciencx (2025-02-24T20:28:56+00:00) Understanding the Basics of GitHub: An Introduction for Beginners. Retrieved from https://www.scien.cx/2025/02/24/understanding-the-basics-of-github-an-introduction-for-beginners/

MLA
" » Understanding the Basics of GitHub: An Introduction for Beginners." Nwankwo Victor Uzoma | Sciencx - Monday February 24, 2025, https://www.scien.cx/2025/02/24/understanding-the-basics-of-github-an-introduction-for-beginners/
HARVARD
Nwankwo Victor Uzoma | Sciencx Monday February 24, 2025 » Understanding the Basics of GitHub: An Introduction for Beginners., viewed ,<https://www.scien.cx/2025/02/24/understanding-the-basics-of-github-an-introduction-for-beginners/>
VANCOUVER
Nwankwo Victor Uzoma | Sciencx - » Understanding the Basics of GitHub: An Introduction for Beginners. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/02/24/understanding-the-basics-of-github-an-introduction-for-beginners/
CHICAGO
" » Understanding the Basics of GitHub: An Introduction for Beginners." Nwankwo Victor Uzoma | Sciencx - Accessed . https://www.scien.cx/2025/02/24/understanding-the-basics-of-github-an-introduction-for-beginners/
IEEE
" » Understanding the Basics of GitHub: An Introduction for Beginners." Nwankwo Victor Uzoma | Sciencx [Online]. Available: https://www.scien.cx/2025/02/24/understanding-the-basics-of-github-an-introduction-for-beginners/. [Accessed: ]
rf:citation
» Understanding the Basics of GitHub: An Introduction for Beginners | Nwankwo Victor Uzoma | Sciencx | https://www.scien.cx/2025/02/24/understanding-the-basics-of-github-an-introduction-for-beginners/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.