{"thread":{"id":"57876","subject":"Failure when adding a tracked file in an ignored directory","startedAt":"2022-05-13T07:10:38Z","lastAt":"2022-05-13T07:10:38Z","messageCount":1,"participants":["Orgad Shaneh"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"455254","messageId":"CAGHpTBJDb4rv1EVvR7J9MNEgf0QnFscaf6rWG4_nOW-JnuO9FQ@mail.gmail.com","threadId":"57876","inReplyTo":null,"subject":"Failure when adding a tracked file in an ignored directory","fromName":"Orgad Shaneh","fromEmail":"orgads@gmail.com","sentAt":"2022-05-13T07:10:22Z","receivedAt":"2022-05-13T07:10:38Z","isPatch":false,"sender":{"key":"orgads@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1246544?v=4"},"body":"Hi,\n\nI have an untracked directory, but inside this directory I have some\nfiles that I do want to track. I added these particular files with git\nadd -f, and committed them successfully.\n\nThe problem is that every time I update any of these files, I must use\ngit add -f, although the files are already tracked.\n\nExample:\n$ git init\n$ mkdir foo\n$ touch foo/bar\n$ git add foo/bar\n$ echo /foo > .gitignore\n$ git add foo/bar\nThe following paths are ignored by one of your .gitignore files:\nfoo\nhint: Use -f if you really want to add them.\nhint: Turn this message off by running\nhint: \"git config advice.addIgnoredFile false\"\n\nIs this intentional? I think it should only warn and fail for *newly\nadded* files, but succeed silently for tracked files.\n\n- Orgad\n"}]}