summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/dfmk14
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/dfmk b/bin/dfmk
index 4a87feb..5588c84 100755
--- a/bin/dfmk
+++ b/bin/dfmk
@@ -16,6 +16,20 @@ for repo in "${@}"; do
# Initialize repository
vcsh init "${repo}"
vcsh "${repo}" remote add origin "$(printf "${REPO_FMT}" "${repo}")"
+ cat >"${HOME}/.gitignore.d/${repo}" <<-EOF
+ # Exclude all files
+ *
+
+ # Include relevant files
+ !/.gitignore.d/
+ !/.gitignore.d/${repo}
+
+ # Exclude swap and backup files
+ *.s[a-w]?
+ *.vim
+ *~
+ *.orig
+ EOF
# Add repository to mr.git
cat >"${HOME}/.config/mr/available.d/${repo}.vcsh" <<-EOF