<aside> ℹ️

Git is a version control system that allows developers to collaborate on projects and keep track of changes. GitHub is a hosting platform for version control and collaboration on projects.

</aside>

Git Commands Docs

Reference

GitHub Docs

GitHub.com Help Documentation

Cheat Sheet

github-git-cheat-sheet.pdf

GitHub Git Cheat Sheet

Training

GitHub Training Kit

Licensing

Choose an open source license

Using Git/GitHub

Repository Creation

New Repository

echo "<Text>" >> README.md # create your first file in the repo
git init
git add README.md
git commit -m "<commit message>"
git branch -M main
git remote add origin <repo_url>
git push -u origin main

Existing Repository

git remote add origin >repo_url>
git branch -M main
git push -u origin main

Git Commands

Git has many commands available to help you manage your projects. Some of the most common commands are:

Branches

Branches are used to work on different versions of a project simultaneously. You can create, delete, and merge branches as needed. Common branch commands include: