From Code to Performance

Git and GitHub

This section provides an introduction to version control using Git and collaborative development with GitHub. It covers the basics of Git, including how to create repositories, commit changes, and manage branches. Additionally, it explores how to use GitHub for hosting repositories, collaborating with others, and contributing to open-source projects.

What is Git and Github?

What is Git?

Git is a distributed version control system (DVCS). Unlike older systems (like Subversion or CVS) that rely on a central server, Git allows every developer to keep a full copy of the repository, including its history, on their local machine.



Key features:



Example workflow in Git (Local-first):



  • git init # Start a new repo
  • git add file.txt # Stage changes
  • git commit -m "Message" # Commit snapshot
  • git branch feature-login # Create a new branch
  • git checkout feature-login # Switch to branch
  • What is GitHub?

    GitHub is a cloud-based hosting platform for Git repositories. It adds collaboration, social, and automation layers on top of Git:



    Github vs Git: