Skip to content

Introduction to Git and GitHub#

Understanding Git and GitHub is essential for efficient version control and collaboration in software development. Before setting up and using GitHub within Visual Studio Code (VS Code), it is important to become familiar with fundamental concepts.

Terminologies#

Below are key terms that will help you grasp the basics of Git and GitHub:

  • Repository (Repo): A storage space where your project's files and their revision history are kept. Think of it as a project's folder.

  • Initializing a Repository: The process of creating a new Git repository in a project directory.

  • Commit: A snapshot of your project's files at a specific point in time. Each commit records changes made to the files, along with a message describing the changes.

  • Staging: The process of selecting files that should be included in the next commit.

  • Branch: A parallel version of your repository. Branches allow you to work on different features or fixes separately before merging them into the main project.

  • Merging: The process of integrating changes from one branch into another. This is commonly done to combine a feature branch into the main branch after development.

  • Pushing: The action of sending committed changes from your local repository to a remote repository.

  • Clone: Creating a local copy of a remote repository on your machine, allowing you to work on the project offline.

  • Fork: A personal copy of someone else's repository. Forking allows you to experiment with changes without affecting the original project.

  • Pull Request (PR): A method of submitting contributions to a project. After making changes in a forked repository, you can open a PR to propose merging your changes into the original repository.

  • Remote: A version of your repository hosted on the internet or another network. It can be accessed by multiple collaborators.

  • Staging Area (Index): A space where changes are gathered before committing them. It allows you to prepare and review changes before finalizing them.

  • Working Directory: The files and directories that you are currently working on. Changes here can be staged and then committed to the repository.

For a more comprehensive glossary, you can refer to the GitHub Glossary.


Setting up and Using Git#

The video below provides a comprehensive guide on setting up and using GitHub within Visual Studio Code (VS Code). It covers essential topics such as initializing a repository, staging and committing changes, branching, merging, and pushing code to GitHub. By following this tutorial, you'll gain a solid understanding of how to integrate GitHub into your VS Code workflow, enhancing your development efficiency.

Other Useful Resources#

For further learning, consider exploring these resources: