From Code to Performance

Git and Github

Introduction to Version Control and Collaboration

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?

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 benefits:

Example workflow in Git (local):

git init                             # Initialize a new Git repository
git add .                            # Stage all changes for commit
git commit -m "Initial commit"       # Commit changes with a message
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:

Git vs. GitHub

In summary, Git and GitHub serve different but complementary purposes: