Reinitialize Git Repo

I have a git repository hosted on a server. We have 5 team members and they are all cloned from the same repo. Since the initial .log and .yml files are tracked.

Is there an easy way to make git not track these files. We tried - without changes, but we could not get through.

Can anyone suggest step-by-step instructions to achieve the above?

Thanks Imran

+5
source share
2 answers

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.

+6

.gitignore , .

.

0

All Articles