{"thread":{"id":"52213","subject":"No Checkout / Read Only config Flag","startedAt":"2019-11-07T21:34:37Z","lastAt":"2019-11-08T16:32:21Z","messageCount":3,"participants":["Ingo Wolf","Philip Oakley","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"385741","messageId":"f3378b7b-c745-58db-55ed-c2c2a6818734@gmx.de","threadId":"52213","inReplyTo":null,"subject":"No Checkout / Read Only config Flag","fromName":"Ingo Wolf","fromEmail":"ingo.wolf@gmx.de","sentAt":"2019-11-07T21:34:32Z","receivedAt":"2019-11-07T21:34:37Z","isPatch":false,"sender":{"key":"ingo.wolf@gmx.de","avatar":null},"body":"Hi,\n\nis there a readonly / no checkout flag in the git configs?\n\nI use Git to trace / Backup some worktrees and would like to prevent\nchanging them accidentally with git.\n\n"},{"id":"385790","messageId":"baf800ba-d92c-74be-d590-56f3bb4c6c44@iee.email","threadId":"52213","inReplyTo":"f3378b7b-c745-58db-55ed-c2c2a6818734@gmx.de","subject":"Re: No Checkout / Read Only config Flag","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.email","sentAt":"2019-11-08T16:08:35Z","receivedAt":"2019-11-08T16:08:37Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"On 07/11/2019 21:34, Ingo Wolf wrote:\n> Hi,\n>\n> is there a readonly / no checkout flag in the git configs?\n>\nNot that I'm aware of, but the use-case isn't clear, and is perhaps \ncontrary to actually having a version management system\n> I use Git to trace / Backup some worktrees and would like to prevent\n> changing them accidentally with git.\n>\nHow would such 'accidents' happen? What's the size of the worktree and \nhow do you do such an accidental commit?\n\nI could see that if you are changing hundreds of files within a commit, \nand only one or two files need preserved, then did a `git add -A` you \nwould include any changes to those one or two special files, which \nneeded special attention.\n\nThis feels similar but not quite the same as previous discussions about \n'precious' files (the latter commonly being untracked/ignored, but \nshouldn't be removed/cleaned).\n\nTechnology won't solve the human error modes..., though a clear use case \ncan help.\n-- \nPhilip\n\n"},{"id":"385791","messageId":"20191108155037.rru2glzbdw4npnte@carbon","threadId":"52213","inReplyTo":"f3378b7b-c745-58db-55ed-c2c2a6818734@gmx.de","subject":"Re: No Checkout / Read Only config Flag","fromName":"Konstantin Khomoutov","fromEmail":"kostix@bswap.ru","sentAt":"2019-11-08T15:50:37Z","receivedAt":"2019-11-08T16:32:21Z","isPatch":false,"sender":{"key":"kostix@bswap.ru","avatar":null},"body":"On Thu, Nov 07, 2019 at 10:34:32PM +0100, Ingo Wolf wrote:\n\n> is there a readonly / no checkout flag in the git configs?\n> \n> I use Git to trace / Backup some worktrees and would like to prevent\n> changing them accidentally with git.\n\nThere's so-called \"sparse checkout\" feature in Git: it allows the user\nto designate parts of the work tree hierarchy as uninteresting, and Git\nwon't touch them unless told otherwise.\n\nPlease refer to the section \"SPARSE CHECKOUT\" in the git-read-tree\nmanual page (run `git help read-tree`).\n\nTo cite the git-checkout manual page:\n\n| --ignore-skip-worktree-bits\n|   In sparse checkout mode, git checkout -- <paths> would update only\n|   entries matched by <paths> and sparse patterns in\n|   $GIT_DIR/info/sparse-checkout. This option ignores the sparse patterns\n|   and adds back any files in <paths>.\n\n"}]}