this is the code that i type for make it dynamically:
#!/bin/bash
GITIGNORE_FILE=".gitignore"
if [ -f "$GITIGNORE_FILE" ]; then
rm "$GITIGNORE_FILE"
fi
touch "$GITIGNORE_FILE"
for dir in */; do
echo "$dir" >> "$GITIGNORE_FILE"
done
echo ".DS_Store" >> "$GITIGNORE_FILE"
echo ".gitignore already created."
this is the code that i type for make it dynamically:
#!/bin/bash
GITIGNORE_FILE=".gitignore"
if [ -f "$GITIGNORE_FILE" ]; then
rm "$GITIGNORE_FILE"
fi
touch "$GITIGNORE_FILE"
for dir in */; do
echo "$dir" >> "$GITIGNORE_FILE"
done
echo ".DS_Store" >> "$GITIGNORE_FILE"
echo ".gitignore already created."