You can create a file called ".gitignore" in the root directory of the repository with the following contents:
*.yml
*.log
To make git ignore changes to pattern matching files. To remove pre-existing copies of .yml and .log files, you must do the following:
rm *.yml *.log
git rm *.yml *.log
git commit -m "removed .yml and .log files"
.yml( , ), .gitignore, git -add . - .yml , git .
, .gitignore, . , .gitignore , ".gitignore" .gitignore.