# Code examples from: Git for Beginners: Save Versions of Your Work Without “final_v7”
# https://www.atulvij.com/git-basics-for-beginners
# Review and adapt before running; examples use sample values.

# ---- Example 1 (bash) ----
git init                         # start tracking this folder
git add .                        # stage all files
git commit -m "First version"    # save a snapshot
git log --oneline                # list snapshots
git checkout -b new-report       # start a branch
# ...edit files...
git add . && git commit -m "Add region chart"
git checkout master              # back to the main line
git merge new-report             # bring the work in

# ---- Example 2 (bash) ----
git diff                         # what changed since the last commit
git checkout -- macros.bas       # throw away edits to one file
git revert <commit-id>           # undo an old commit safely

