From 244fe2fdeea6dd2cbd7df8830d7489785d123025 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 18 Feb 2019 18:11:36 +0100 Subject: [PATCH] Set git to ignore what happens with the README locally. so it can be removed from the homedir. --- .zsh.d/04-set-up-dotfiles-repo-management | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.zsh.d/04-set-up-dotfiles-repo-management b/.zsh.d/04-set-up-dotfiles-repo-management index 9719f97..0b49932 100644 --- a/.zsh.d/04-set-up-dotfiles-repo-management +++ b/.zsh.d/04-set-up-dotfiles-repo-management @@ -1,2 +1,17 @@ # enables git management through dotfiles command alias dotfiles='/usr/bin/git --git-dir=/home/marty/.dotfiles/ --work-tree=/home/marty' +alias df=dotfiles + +## Make git assume the readme is not changing (essentially ignore it). +# +# This means you can safely remove the README.md file from your home dir +# without git trying to delete it from the repository. +# If you WANT to make changes to the README.md, you will have to make git +# watch it again with the commented out command +# +# Read more: https://stackoverflow.com/questions/4308610/how-to-ignore-certain-files-in-git +# and: https://stackoverflow.com/questions/653454/how-do-you-make-git-ignore-files-without-using-gitignore +# +#dotfiles update-index --no-assume-unchanged README.md + +dotfiles update-index --assume-unchanged README.md