Ignore untracked files inside a specific folder #22754
-
Hello! I have a directory in my git repo, that I don’t want to be changed ever. Another approach was just to copy the whole folder into my repository. The main issue is that this folder will be changed a lot while running the code locally, but I dont want to push anything upstream and I want git to ignore all of it. I’ve used git update-index --skip-worktree successfully for already tracked files in those folders. However, new additions still come up as unstaged files. What would be the best way to tell git to “lock” that folder for changes and ignore everything, and let the folder remain in the repo? Thanks in advance! Update: Seems to work fine this far! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Put a |
Beta Was this translation helpful? Give feedback.
-
Thank you, see my edit above! |
Beta Was this translation helpful? Give feedback.
Thank you, see my edit above!