Skip to content

feature suggestion, add create .gitignore dynamically #16

Description

@altamisatmaja

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."

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions