{"thread":{"id":"51493","subject":"Re: [gitgitgadget/git] Adding git-ignore command, tests, and documentation. (#264)","startedAt":"2019-07-17T17:12:26Z","lastAt":"2019-07-17T17:15:29Z","messageCount":2,"participants":["Thurston Stone"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"379022","messageId":"YmOpqT5Q4a9QdU5RJmIbisRhQMnkcZt7GFT7E0xH4cqAWr0mEiHlYzLmpI8eKSPPQDZmQRmfUzdzqxDSb-iBwYhFHtJ6edCFb8I05ld0vFM=@protonmail.com","threadId":"51493","inReplyTo":"gitgitgadget/git/pull/264/c512358757@github.com","subject":"Re: [gitgitgadget/git] Adding git-ignore command, tests, and documentation. (#264)","fromName":"Thurston Stone","fromEmail":"tstone2077@protonmail.com","sentAt":"2019-07-17T17:12:14Z","receivedAt":"2019-07-17T17:12:26Z","isPatch":false,"sender":{"key":"tstone2077@protonmail.com","avatar":"https://gravatar.com/avatar/02a2a061e5e6f40a1519bc678eb0f601bc6fe9ac4cd5525494a2a4a6626ba569?d=mp&s=160"},"body":"> Wouldn't this simpler to type and less error prone, as you do\n> have to\n>\t$ cd path/to/the\n>\t... work in that deep\n>\t... realize that file.txt in that directory needs ignoring ...\n>\t$ echo file.txt > .gitignore\nthat would have \"path/to/the/.gitignore\" which contains \"file.txt\".\nWhereas that does work fine, it can be cumbersome to manage a multitude\ngitignore files (it can get out of hand). If a policy is in place to\nconsolidate this management into the root gitignore, they'd have to run:\n\n$ cd path/to/the\n\t... work in that deep directory ...\n\t... realize that file.txt in that directory needs ignoring ...\n\t... know relative path of both desired ignore file and cwd ...\n$ echo path/to/the/file.txt > ../../../.gitignore\n\t... or with this script ...\n$ git ignore path/to/the/file.txt\n\nAnother example might be when the code is deeper embeded, like a\njava library path.\n$ cd code/src/com/mylib\n\t... work under that directory ...\n\t... realize subclass/helpers/testdata.json needs ignoring ...\n \t... need to know the full path of ignore file, cwd, and\n\t\tthe relative path to root gitignore ...\n$ echo code/src/com/mylib/subclass/helpers/testdata.json > ../../../../.gitignore\n- or the more intuitive: -\n$ git ignore subclass/helpers/testdata.json\n- both ending in the same result\n$ cat ${REPO_ROOT}/.gitignore\ncode/src/com/mylib/subclass/helpers/testdata.json\n\n\n"},{"id":"379023","messageId":"-_9xfW9lD1t4z4qkcMoJ5Jb9gmzayauqKOPDIYIQO4dJQzc-RoVWTNOi9-OsXDzrdhVJPWoRYIa5d0zqIsHBoNzMSuw1_jauUcEaGwIairU=@protonmail.com","threadId":"51493","inReplyTo":"YmOpqT5Q4a9QdU5RJmIbisRhQMnkcZt7GFT7E0xH4cqAWr0mEiHlYzLmpI8eKSPPQDZmQRmfUzdzqxDSb-iBwYhFHtJ6edCFb8I05ld0vFM=@protonmail.com","subject":"Re: [gitgitgadget/git] Adding git-ignore command, tests, and documentation. (#264)","fromName":"Thurston Stone","fromEmail":"tstone2077@protonmail.com","sentAt":"2019-07-17T17:15:19Z","receivedAt":"2019-07-17T17:15:29Z","isPatch":false,"sender":{"key":"tstone2077@protonmail.com","avatar":"https://gravatar.com/avatar/02a2a061e5e6f40a1519bc678eb0f601bc6fe9ac4cd5525494a2a4a6626ba569?d=mp&s=160"},"body":"my mistake, my last email should have read:\n\n$ cd path/to/the\n ... work in that deep directory ...\n ... realize that file.txt in that directory needs ignoring ...\n ... know relative path of both desired ignore file and cwd ...\n$ echo path/to/the/file.txt > ../../../.gitignore\n     ... or with this script ...\n--CORRECTION--\n$ git ignore file.txt\n"}]}