Skip to main content

Introduction to Git & GitHub

Git​

Git is a version control system that allows you to track changes to your code, collaborate with others, and manage your codebase. It helps you keep a record of who made changes, when they were made, and why they were made.

Key Features​

  • Commit: Saving changes in code is like taking a snapshot. A "commit" is a snapshot of the code at a specific time.

  • Branch: Think of code as a tree. A "branch" is like a new part of the tree where you work on changes without affecting the main part until you're ready.

  • Merge: Combining changes from different branches back into the main code is called "merge."

GitHub​

GitHub is a web-based hosting platform designed for developers. It provides a centralized location to store your code repositories and enables collaboration among team members. GitHub supports projects in various programming languages and allows others to review and contribute to your code. It is a free and open-source platform, making it widely used and popular among developers.

Key Features​

  • Get Code: Use Git to get the code on your computer.
  • Make Changes: Make changes and take snapshots (commits) with Git.
  • Share on GitHub: Share your code, propose changes, and work with others.
  • Discuss and Improve: GitHub helps you talk about issues, suggest changes, and make your code better together.
output-

Git and GitHub are like teamwork tools for coding. Git keeps track of changes, and GitHub makes it easy for people to work on code together.