Links
- Become a Git pro in just one blog.
A thorough guide to Git architecture and command-line interface Become a Git pro in just one blog.
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:
- git - .gitignore exclude folder but include specific subfolder - Stack Overflow
- git - Make .gitignore ignore everything except a few files - Stack Overflow
Here is the result
▶ git ls-tree -r master --name-only
.gitignore
folder1/folder3/resources MOC.md
folder1/notes.md
folder2/notes.md