๐Ÿค” Why git?

And why not google drive? ๐Ÿคจ๐Ÿ‘Ž

A reason why Google Docs has become so popular because it made an easy way for a team to collaborate on a document together. A powerful tool Google Docs provides is revision history which gives document owners a way to view and manage past versions of the document. This can be called version control.

Git is the leading form of version control for source code. It is built around the importance of tracking changes and managing collaboration. In this essay, I hope to convince you that this is the right tool for programming small and large projects.

๐Ÿ˜„ Getting Started with Git

  1. Download Git

  2. Clone the remote repository you are working on

    git clone <url to the repository>
    

    Example for PeterPortal Public API:

    git clone <https://github.com/icssc-projects/peterportal-public-api>
    

    Note: This assumes that you are working on a remote repository, since that is the case for most of you in the Projects Committee.

  3. Navigate into the repository you just clones

    cd peterportal-public-api
    

Boom. You are good to proceed.

<aside> ๐Ÿ“š Sources & things: Git Origin Story Why everyone uses Git What is Git - Explain it like I'm Five Basics of Git

</aside>


๐ŸŒฟ Branches

Whether you're joining in on an ICSSC Project or starting a personal website, you'll be working on some sort of feature. Branches exist to manage different features and ideas in progress; thus, the first thing you should do is figure out your branches.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0c4cf4d3-7fc2-4424-af1d-c9ffd6bdc5b0/git-flow-feature-branch.svg

All projects within the ICSSC Project Committee Github have a branch called master or main โ€” for simplicity, we'll be using the name main. Anything within main should be deployable.

โœ… Features within main should be well tested and documented.

๐Ÿ™…โ€โ™€๏ธ Rarely should you be committing directly to main.

So where do you commit your assigned task, new idea, or bug fixes?

โœจ Feature Branch

Your work should be committed to a branch specific to what you are working on, whether it's a new feature or bug fix. This prevents conflicts with your teammates, and your project manager will be able to understand, manage, and test your changes before it merges back into main.