Ignore a folder only on top level of a repository #23600
-
I want to exclude a folder named The folder I created a file Now I called Calling Did I get something wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
reburg67:
As a side note, |
Beta Was this translation helpful? Give feedback.
-
Thanks for the clarification. The command |
Beta Was this translation helpful? Give feedback.
gitignore
rules apply only to untracked files. If you want to stop tracking those files, you have to explicitly remove them from the repository. If you want to keep the files on disk (in your working tree) but remove them from the repository you can usegit rm --cached
.As a side note,
/assets/
would be a better rule, it ignores the directory and everything in it. It only makes a difference if you have files starting with names starting with a dot in the directory, though.