# Git 101 ###### tags: `git` `github` `commit` To create a personal token see [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) ## Setup 1. git init 2. git config --global user.email "you@example.com" 3. git config --global user.name "Your Name" ## Clone your repository ``` git clone https://{YOUR_PERSONAL_TOKEN}@github.com/{YOUR_USERNAME}/reponame.git ``` ## Git Commits A commit in a git repository records a snapshot of all the (tracked) files in your directory. A properly formed git commit message will be able to answer the question: **if applied, this commit will?...** E.g: If applied, this commit will refactor subsystem X for readability If applied, this commit will remove deprecated methods ## Flow ### Making changes 1. make changes to docs as needed 1. git add . {be sure to be in the top most folder for the folders with changes you wish to add otherwise some might be left out} 1. git commit -m 'commit message' 1. git push ### Getting changes 1. git fetch origin 1. git merge origin/master ## References https://codeinthehole.com/tips/pull-requests-and-other-good-practices-for-teams-using-github/ https://learngitbranching.js.org/ https://cbea.ms/git-commit/