Git & GitHub Basics

Git & GitHub Basics

What is Git?

Git is a specific open-source version control system created by Linus Torvalds in 2005.

Specifically, Git is a distributed version control system, which means that the entire codebase and history are available on every developer’s computer, which allows for easy branching and merging.

According to a Stack Overflow developer survey, over 87% of developers use Git

Installation Link for Git - Git - Downloads (git-scm.com)

What is GitHub?

GitHub is a for-profit company that offers a cloud-based Git repository hosting service.

GitHub is so user-friendly, though, that some people even use GitHub to manage other types of projects

Additionally, anyone can sign up and host a public code repository for free, which makes GitHub especially popular with open-source projects.

Essentially, it makes it a lot easier for individuals and teams to use Git for version control and collaboration.

GitHub - github.com

GitHub Student Campus Program - Students - GitHub Education

What is Version Control?

Version control helps developers track and manage changes to a software project’s code. As a software project grows, version control becomes essential.

Benefits of GitHub?

1. It makes it easy to contribute to your open-source projects

2. Documentation

3. Showcase your work

4. Track changes in your code across versions

5. Integration options

Alternatives of GitHub?

  1. GitLab - The DevSecOps Platform | GitLab

  2. Bitbucket - Bitbucket | Git solution for teams using Jira

  3. AWS CodeCmmit - AWS CodeCommit Documentation (amazon.com)

Git Basic Terms

  1. Git Repository - A Git repository is a directory that contains a Git working directory. The working directory contains all the files that are tracked by Git.

  2. Git Remote Repository - A Git remote repository is a repository that is stored on a remote server. We can think of a Git remote repository as a remote file system.

  3. Branch - The branch can be thought of as an alternate repository that diverges from the Git Working Directory or main project. A Branch can be a different version of the same repository.

  4. Checkout - Checkout is a command that is used to switch between branches.

  5. Merge - Merge is a command that is used to merge the changes from one branch to another branch.

  6. Pull - Pull is a command that is used to pull the changes from the remote repository to the local repository. Git Pull will fetch the changes from the remote repository and then download that content locally from the remote repository.

  7. Push - Push is a command that is used to push the changes from the local repository to the remote repository.

  8. Clone - Clone is a command that is used to clone the remote repository to the local repository.

  9. Status - Status is a command that is used to show the status of the local repository.

  10. Fork - A git fork is a copy of a repository that is stored on a remote server.

Sources:

  1. 30 Most Important Git Terminologies That Developers Must Know - GeeksforGeeks

  2. Top 10 GitHub Alternatives That You Can Consider - GeeksforGeeks

  3. What Is GitHub? A Beginner's Introduction to GitHub (kinsta.com)