#!/bin/bash
# 02_status_add_commit.sh - מחזור החיים הבסיסי של git

# יצירת מספר קבצים
echo "console.log('hello');" > app.js
echo "body { margin: 0; }" > styles.css
echo "TODO" > notes.txt

# בדיקת המצב - כל הקבצים ב-untracked
git status

# הוספת שני קבצים בלבד ל-staging
git add app.js styles.css

# בדיקה - שניים ב-staging, אחד עדיין untracked
git status

# commit של מה שב-staging
git commit -m "Add app skeleton with styles"

# עדכון של app.js
echo "console.log('updated');" > app.js

# הקובץ עכשיו מסומן כ-modified
git status

# הוספה ו-commit עם am
git commit -am "Update app log message"

# הקובץ notes.txt עדיין untracked - ניקוי או הוספה
git status
