Difference between .gitignore and .gitkeep files?
Features |
‘.gitignore’ |
‘.gitkeep’ |
---|---|---|
Purpose |
It specifies file and directories should by ignore by git |
It ensures the empty directory must be tracked by Git |
File Content |
It uses filename, and pattern for ignoring the file in Git |
It is just a empty hidden file in your directory |
Use Case |
Ignorind complied files, temporary files, system specific files |
Keep the directory even if the directory is empty |
Syntax |
*.log to ignore all log files |
It has specific syntax |
Impact |
Prevent unwanted to file to tracked in Git |
Allows empty folder to track in Git |
Difference between .gitignore and .gitkeep
Git is a command line tool which is widely used for changes in source code during software development processes. It was developed by the Linux Torvalds in 2005 to manage the Linux Kernel development. This post will show the difference between the .gitignore and .gitkeep files.