Git is version control for code. To get started, [[install git]]. ## Common git commands **Command** | **Result** -----|----- `git pull` | pull from GitHub `git status` | review staging area `git add -A` | add new files and changes to staging area (`-A` can also be `.`) `git commit -m "<message>"` | commit staged changes `git commit -am "<message>"` | add and commit changes `git push` | push from main branch to origin remote ## Advanced git commands **Command** | **Result** -----|----- `git log` | print git history (more verbose than git hist) `git hist` | print git history in short form `git branch <branch>` | create new branch `git checkout <branch>` | checkout a branch `git checkout -b <branch>` | create and checkout a branch `git push --set-upstream origin` | push a new branch to GitHub `git merge <branch>` | merge a branch `git rm -rf <file>` | delete a file from git entirely > [!Tip]- Additional Resources > - [Corey Shafer's excellent series on Git](https://youtu.be/HVsySz-h9r4?si=vBUYhof6dAt5ljTB) > - [InitialCommit.com](https://initialcommit.com/)