Skip to content

.gitignore not ignoring the files specified. #24023

Answered by sfynx
maarid asked this question in New to GitHub
Discussion options

You must be logged in to vote

A .gitignore file only affects untracked files that you don’t want to add to the repository.

It seems to me that /app/etc/config.php is already tracked in your repository. In that case pushing and pulling changes to it will not be affected by the .gitignore file, see also: https://git-scm.com/docs/gitignore

If you didn’t want to add this file to the repository, you can use git rm --cached to remove the file from the index, but keep it around locally.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants