Links

 

Snippets

Gitignore template file for syncing only .md files recursively and ignoring everything else

#.gitignore
# Ignore everything recursively
*


# Don't ignore .gitignore
!.gitignore


# Now exclude markdown and txt files
!**.md
!**/*.md

!**.txt
!**/*.txt

# Don't ignore 
# ...even if they are in subdirectories
!*/


# Now you can push to remote repo to have a backup of all your md files on GitHub.
# You can also write script for crontab to sync regularly
						

links:

Here is the result

▶ git ls-tree -r master --name-only
.gitignore
folder1/folder3/resources MOC.md
folder1/notes.md
folder2/notes.md