How to ignore files and directory with .gitignore in Git
by Gitfiled in
.gitignore file helps us to ignore any matching files and directory with a list of patterns that listed in .gitignore on each git add.
Here are some examples which help to exclude files and directories from git repository commits.
Create .gitignore file
.gitignore files are matched from the root directory of the fit repository. Patterns used a wildcard character * to match any character and literal characters to match the exact phrase.
This example will exclude all the files ending in .log
This example will exclude all the files that matches any character before and after .log
This example will exclude all files in a specific path