{"thread":{"id":"27622","subject":"Objects deleted before first commit","startedAt":"2011-06-14T12:43:04Z","lastAt":"2011-06-16T20:38:17Z","messageCount":10,"participants":["Edmondo Porcu","David Barr","PJ Weisberg","Carlos Martín Nieto","Tomas Carnecky"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"169998","messageId":"8269100C7056D24A91B672AF7E5E48492D959E@exchange.GottexBrokers.local","threadId":"27622","inReplyTo":null,"subject":"Objects deleted before first commit","fromName":"Edmondo Porcu","fromEmail":"edmondo.porcu@gottexbrokers.com","sentAt":"2011-06-14T12:43:04Z","receivedAt":"2011-06-14T12:43:04Z","isPatch":false,"sender":{"key":"edmondo.porcu@gottexbrokers.com","avatar":null},"body":"commit\n\nDear All,\nI have created a git repository, and then I have deleted by error some files with rm -rf .\nNow the files have disappeared from the hard disk, I am desperately looking on how to restore them. The objects folder is full of dangling objects, but I do not know how to recover them.\n\nPlease help me\n\nEdmondo Porcu\nFinancial  software architect\n\n\n\nAvenue de Rhodanie 48\n1007 Lausanne\nSwitzerland.\n\nDir  +41 (0) 21  560 30 82\nFax +41 (0) 21  617 71 55\nEmail : edmondo.porcu@gottexbrokers.com\n\nThe information in this email is confidential and may be legally privileged. If you are not the intended recipient, you must not read, use or disseminate the information. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Gottex Group of Companies for any loss or damage arising in any way from its use.\n"},{"id":"169999","messageId":"BANLkTikSPNVbGFRUVh5eSFsxabVWT7SVVA@mail.gmail.com","threadId":"27622","inReplyTo":"8269100C7056D24A91B672AF7E5E48492D959E@exchange.GottexBrokers.local","subject":"Re: Objects deleted before first commit","fromName":"David Barr","fromEmail":"davidbarr@google.com","sentAt":"2011-06-14T12:57:54Z","receivedAt":"2011-06-14T12:57:54Z","isPatch":false,"sender":{"key":"davidbarr@google.com","avatar":"https://avatars.githubusercontent.com/u/220594?v=4"},"body":"On Tue, Jun 14, 2011 at 10:43 PM, Edmondo Porcu\n<Edmondo.Porcu@gottexbrokers.com> wrote:\n> I have created a git repository, and then I have deleted by error some files with rm -rf .\n> Now the files have disappeared from the hard disk, I am desperately looking on how to restore them. The objects folder is full of dangling objects, but I do not know how to recover them.\n\nIf you did use 'git add' to stage your work before the unfortunate\ninvocation of rm, the blobs should be accessible.\n\nSomething like the following might work:\ngit show `cd .git/objects; ls ??/* | tr -d /`\n\nThis will pretty print all loose objects.\n--\nDavid Barr.\n"},{"id":"170000","messageId":"8269100C7056D24A91B672AF7E5E48492D95BB@exchange.GottexBrokers.local","threadId":"27622","inReplyTo":"BANLkTikSPNVbGFRUVh5eSFsxabVWT7SVVA@mail.gmail.com","subject":"RE: Objects deleted before first commit","fromName":"Edmondo Porcu","fromEmail":"edmondo.porcu@gottexbrokers.com","sentAt":"2011-06-14T13:00:12Z","receivedAt":"2011-06-14T13:00:12Z","isPatch":false,"sender":{"key":"edmondo.porcu@gottexbrokers.com","avatar":null},"body":"In fact I have some folders and files there, but I have no idea on how to restore them into \"Real Files\". I am using windows 7 unluckily, but I have managed to find the files. This is an extract of my git fsck:\n\n\ndangling blob 43cb00bb9f23b73afc874c4105b136f8c426e4a5\ndangling blob 48ef642adb1549ee1d4040ec9337d3a47c19d422\ndangling blob 4cf3c37ee29d1ceac9959e9dabde5f32eba8bc14\ndangling blob 4ff7172c54e1f67e8c5a8ac6f49d2ede702747e7\ndangling blob 51a746ceede3b0c61f4f7decd63d78c40c4772e8\ndangling blob 53a30509175c31e651605d40e0bb8285eeffd67c\ndangling blob 5877a2433fc2cc384bafb9bfca545ce6880b88d7\ndangling blob 59137f1fd4c8905ebc316f7113392d01d91b37c1\ndangling blob 5bdf3d9fd6ccc47eae53ef69d63e3852b5c95975\ndangling blob 5f6327c2b506813f442cde76da067bf44f5a7ff6\ndangling blob 5fefe72c7737c47fc1ab46e18d42138b9a962b59\ndangling blob 6423072e9d2ba825b41183b8d061026580185938\ndangling blob 68cbb38aec908417c4cefb9a15cb27b5763fa598\ndangling blob 717f2a64ef775eb71b1cef4870dded92c5cde838\ndangling blob 721743d1c61727b77df083b5f06d8cea4fbc85a7\ndangling blob 7323efecc86ac03037f17925c2fd981921f969fa\ndangling blob 77c79b12b01567f2e4e78c60a5168d6d60e51787\ndangling blob 7daf896d97fd796c0a8e8093ba426bf488e3567b\ndangling blob 7eabf5e3d2bc12df57af9b640cf864070fc589f7\ndangling blob 83c3ba571822b67359a0573ebb1aaf1edbf66110\ndangling blob 83cf30ac74d4b56953db017bd0793ee4cd5579d7\ndangling blob 87733108c9d6a268da34c10f4defc1b7bb92ba02\ndangling blob 8abf694b11a2cf34b5c3e21057542992f1efce9b\ndangling blob 8cc3fad8d0ea8a6daf8f7e3fc6bcf6cedcbd92cc\ndangling blob 8f3b009a1a384cd4e71589b85b353c1d6eb721b7\ndangling blob 9087db2d16660e0fa83bc9d3c64bd01e21807d61\ndangling blob 90c39a97d03e22a9318a2e14c363388ac342faa9\ndangling blob 91834d9a142c874cc32ec267c7582066c36ef184\ndangling blob 921372d4d6d7480b8412e8fc6c7874c11235b804\ndangling blob 92a73995eb057fd8bf6004255862eb022fc9e34f\ndangling blob 94177daa77f896aba7a48a8b4daaa984ebc004c3\ndangling blob 9483128d060cd6d99f4e29df3ccfd479b771abcb\ndangling blob 968b4f44763ba93aba1b2fc20cc081b7f01db316\ndangling blob 995f114e2eb864920576bbd63f46bb05dc3ede6f\ndangling blob 9c7b8dedb2682badabbdaa61bbe944a0190e49e6\ndangling blob 9d0bcc97d6e0fa9119ec266bb4d7f741dad0e452\ndangling blob 9dbbd4aa5a8b4a409561e3ed5eb5102e12627cce\ndangling blob acc38a42f10e6c022d655f1eac3358fcb86c0605\ndangling blob b01b840d2522b80b5aa47c0a9caf266943b4cc9a\ndangling blob b3a3303f00c61133b9b287b41310a0573b31e5bb\ndangling blob b7438803f774b309833046b471b66194cb0e297f\ndangling blob b89b84baacb432b04733449da40e7b2b2b439f03\ndangling blob bf33ef8cd1beadfc7a6b22ff3d55ee4b2294ae48\ndangling blob c57f6f8c5406a5d8c53114a6d7c9f82e790e9969\ndangling blob d06332575bf4c46469b8bedfd18c69cb4653095c\ndangling blob d49ba81f960dc8abf1892573515f4a5231405125\ndangling blob d66ba089f65c99cc06807fe690840d7a8302105b\ndangling blob d70f55535e3bf326f78ebb162fb7ee13b9603746\ndangling blob da1f11eedf8cbc532f4aad7d0686415190e1fe97\ndangling blob ddbb9c6af5a001d7e0ab6ddf993f5a7f7ce8d864\ndangling blob e1834e238ff682a9606822bd943ed872ffb93da9\ndangling blob e19f3a0b3dec6534ec20015bc616e291444493d0\ndangling blob e373dca971b1fd5223e40de3b70cf2977bde1e06\ndangling blob e74fe9499028597a30a77517601c49d59ac41a69\ndangling blob e77b60f836331e54a3f4059d9d1c2e486e37b831\ndangling blob eb2f8dcb9488d9f3483c094083df4673b9c4b35d\ndangling blob ef5794b3373cb14c90ffd83f3b3ff2d98b780b43\ndangling blob fa8b75106f0bc76edd4961588480653e053881f0\ndangling blob fd33afe21d6abb02677310d32c9362ef6a18287e\n\n\nEdmondo Porcu\nFinancial  software architect\n\n\n\nAvenue de Rhodanie 48\n1007 Lausanne\nSwitzerland.\n\nDir  +41 (0) 21  560 30 82\nFax +41 (0) 21  617 71 55\nEmail : edmondo.porcu@gottexbrokers.com\n\nThe information in this email is confidential and may be legally privileged. If you are not the intended recipient, you must not read, use or disseminate the information. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Gottex Group of Companies for any loss or damage arising in any way from its use.\n\n\n-----Original Message-----\nFrom: David Barr [mailto:davidbarr@google.com] \nSent: mardi 14 juin 2011 14:58\nTo: Edmondo Porcu\nCc: git@vger.kernel.org\nSubject: Re: Objects deleted before first commit\n\nOn Tue, Jun 14, 2011 at 10:43 PM, Edmondo Porcu\n<Edmondo.Porcu@gottexbrokers.com> wrote:\n> I have created a git repository, and then I have deleted by error some files with rm -rf .\n> Now the files have disappeared from the hard disk, I am desperately looking on how to restore them. The objects folder is full of dangling objects, but I do not know how to recover them.\n\nIf you did use 'git add' to stage your work before the unfortunate\ninvocation of rm, the blobs should be accessible.\n\nSomething like the following might work:\ngit show `cd .git/objects; ls ??/* | tr -d /`\n\nThis will pretty print all loose objects.\n--\nDavid Barr.\n\n______________________________________________________________________\nThis email has been scanned by the MessageLabs Email Security System.\nFor more information please visit http://www.messagelabs.com/email \n______________________________________________________________________\n"},{"id":"170001","messageId":"BANLkTik1jTq6otRvHwbo342oH7Dwy+vs_w@mail.gmail.com","threadId":"27622","inReplyTo":"8269100C7056D24A91B672AF7E5E48492D95BB@exchange.GottexBrokers.local","subject":"Re: Objects deleted before first commit","fromName":"David Barr","fromEmail":"davidbarr@google.com","sentAt":"2011-06-14T13:06:58Z","receivedAt":"2011-06-14T13:06:58Z","isPatch":false,"sender":{"key":"davidbarr@google.com","avatar":"https://avatars.githubusercontent.com/u/220594?v=4"},"body":"On Tue, Jun 14, 2011 at 11:00 PM, Edmondo Porcu\n<Edmondo.Porcu@gottexbrokers.com> wrote:\n> In fact I have some folders and files there, but I have no idea on how to restore them into \"Real Files\". I am using windows 7 unluckily, but I have managed to find the files. This is an extract of my git fsck:\n>\n> dangling blob 43cb00bb9f23b73afc874c4105b136f8c426e4a5\n> dangling blob 48ef642adb1549ee1d4040ec9337d3a47c19d422\n[...]\n\nWas it 'rm -rf' or 'git rm -rf'?\nIf just the non-git command, maybe 'git checkout -- <missing paths>'?\n\n--\nDavid Barr.\n"},{"id":"170007","messageId":"BANLkTin9_jfvtYdCsJLiWAoOvO2e1f=9SA@mail.gmail.com","threadId":"27622","inReplyTo":"BANLkTik1jTq6otRvHwbo342oH7Dwy+vs_w@mail.gmail.com","subject":"Re: Objects deleted before first commit","fromName":"PJ Weisberg","fromEmail":"pjweisberg@gmail.com","sentAt":"2011-06-14T14:44:13Z","receivedAt":"2011-06-14T14:44:13Z","isPatch":false,"sender":{"key":"pjweisberg@gmail.com","avatar":"https://gravatar.com/avatar/e585568071f361126c42f73b11bee72fc6d4bdfea34be29faa52e621da3517eb?d=mp&s=160"},"body":"On Tuesday, June 14, 2011, David Barr <davidbarr@google.com> wrote:\n> On Tue, Jun 14, 2011 at 11:00 PM, Edmondo Porcu\n> <Edmondo.Porcu@gottexbrokers.com> wrote:\n>> dangling blob 43cb00bb9f23b73afc874c4105b136f8c426e4a5\n>> dangling blob 48ef642adb1549ee1d4040ec9337d3a47c19d422\n> [...]\n>\n> Was it 'rm -rf' or 'git rm -rf'?\n> If just the non-git command, maybe 'git checkout -- <missing paths>'?\n\nNot if it was never checked in, unfortunately.\n\n'git cat-file -p <hash>' prints the contents of the file.  It's up to\nyou to figure out which is the version you want and what the filenames\nwere.\n\n-- \n\n-PJ\n"},{"id":"170008","messageId":"8269100C7056D24A91B672AF7E5E48492D963B@exchange.GottexBrokers.local","threadId":"27622","inReplyTo":"BANLkTin9_jfvtYdCsJLiWAoOvO2e1f=9SA@mail.gmail.com","subject":"RE: Objects deleted before first commit","fromName":"Edmondo Porcu","fromEmail":"edmondo.porcu@gottexbrokers.com","sentAt":"2011-06-14T14:46:00Z","receivedAt":"2011-06-14T14:46:00Z","isPatch":false,"sender":{"key":"edmondo.porcu@gottexbrokers.com","avatar":null},"body":"Dear all,\nI have tried to copy my objects folder into my git root folder.\n\nD:\\vce\\GottwareNet>git cat-file -p 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\nfatal: Not a valid object name 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n\nD:\\vce\\GottwareNet>ls 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n\nPlease help me we are talking about thousands of line of code!!! :(\n\nEdmondo Porcu\nFinancial  software architect\n\n\n\nAvenue de Rhodanie 48\n1007 Lausanne\nSwitzerland.\n\nDir  +41 (0) 21  560 30 82\nFax +41 (0) 21  617 71 55\nEmail : edmondo.porcu@gottexbrokers.com\n\nThe information in this email is confidential and may be legally privileged. If you are not the intended recipient, you must not read, use or disseminate the information. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Gottex Group of Companies for any loss or damage arising in any way from its use.\n\n\n-----Original Message-----\nFrom: PJ Weisberg [mailto:pjweisberg@gmail.com] \nSent: mardi 14 juin 2011 16:44\nTo: David Barr\nCc: Edmondo Porcu; git@vger.kernel.org\nSubject: Re: Objects deleted before first commit\n\nOn Tuesday, June 14, 2011, David Barr <davidbarr@google.com> wrote:\n> On Tue, Jun 14, 2011 at 11:00 PM, Edmondo Porcu\n> <Edmondo.Porcu@gottexbrokers.com> wrote:\n>> dangling blob 43cb00bb9f23b73afc874c4105b136f8c426e4a5\n>> dangling blob 48ef642adb1549ee1d4040ec9337d3a47c19d422\n> [...]\n>\n> Was it 'rm -rf' or 'git rm -rf'?\n> If just the non-git command, maybe 'git checkout -- <missing paths>'?\n\nNot if it was never checked in, unfortunately.\n\n'git cat-file -p <hash>' prints the contents of the file.  It's up to\nyou to figure out which is the version you want and what the filenames\nwere.\n\n-- \n\n-PJ\n\n______________________________________________________________________\nThis email has been scanned by the MessageLabs Email Security System.\nFor more information please visit http://www.messagelabs.com/email \n______________________________________________________________________\n"},{"id":"170009","messageId":"20110614145628.GB30626@bee.lab.cmartin.tk","threadId":"27622","inReplyTo":"8269100C7056D24A91B672AF7E5E48492D963B@exchange.GottexBrokers.local","subject":"Re: Objects deleted before first commit","fromName":"Carlos Martín Nieto","fromEmail":"cmn@elego.de","sentAt":"2011-06-14T14:56:28Z","receivedAt":"2011-06-14T14:56:28Z","isPatch":false,"sender":{"key":"cmn@elego.de","avatar":"https://avatars.githubusercontent.com/u/335443?v=4"},"body":"On Tue, Jun 14, 2011 at 02:46:00PM +0000, Edmondo Porcu wrote:\n> Dear all,\n> I have tried to copy my objects folder into my git root folder.\n> \n> D:\\vce\\GottwareNet>git cat-file -p 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n> fatal: Not a valid object name 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n> \n\ngit cat-file -p 001cd91a8a3a3c99ca7aea73c96b3d2174430947\n\nYou need to specify the object name. In .git/, they're in different\nfolders for speed purposes, but that's an implementation detail.\n\nCheers,\n   cmn\n"},{"id":"170010","messageId":"BANLkTinRkfpvk4H3F3w1xMjDuGTpkeEV3Q@mail.gmail.com","threadId":"27622","inReplyTo":"8269100C7056D24A91B672AF7E5E48492D963B@exchange.GottexBrokers.local","subject":"Re: Objects deleted before first commit","fromName":"PJ Weisberg","fromEmail":"pjweisberg@gmail.com","sentAt":"2011-06-14T14:57:09Z","receivedAt":"2011-06-14T14:57:09Z","isPatch":false,"sender":{"key":"pjweisberg@gmail.com","avatar":"https://gravatar.com/avatar/e585568071f361126c42f73b11bee72fc6d4bdfea34be29faa52e621da3517eb?d=mp&s=160"},"body":"On Tuesday, June 14, 2011, Edmondo Porcu\n<Edmondo.Porcu@gottexbrokers.com> wrote:\n> D:\\vce\\GottwareNet>git cat-file -p 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n> fatal: Not a valid object name 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n\nGet rid of the \\ after the first two digits of the hash.\n\n-- \n\n-PJ\n"},{"id":"170012","messageId":"8269100C7056D24A91B672AF7E5E48492D9650@exchange.GottexBrokers.local","threadId":"27622","inReplyTo":"BANLkTin9_jfvtYdCsJLiWAoOvO2e1f=9SA@mail.gmail.com","subject":"RE: Objects deleted before first commit","fromName":"Edmondo Porcu","fromEmail":"edmondo.porcu@gottexbrokers.com","sentAt":"2011-06-14T14:59:44Z","receivedAt":"2011-06-14T14:59:44Z","isPatch":false,"sender":{"key":"edmondo.porcu@gottexbrokers.com","avatar":null},"body":"God bless you all guys,\nI really wish you the best :)\n\nNow I need a script to restore it...how can I do ?:) In windows, how does one loop over files and directory and concatenate them?\n\nBest Regards\n\n\n\nEdmondo Porcu\nFinancial  software architect\n\n\n\nAvenue de Rhodanie 48\n1007 Lausanne\nSwitzerland.\n\nDir  +41 (0) 21  560 30 82\nFax +41 (0) 21  617 71 55\nEmail : edmondo.porcu@gottexbrokers.com\n\nThe information in this email is confidential and may be legally privileged. If you are not the intended recipient, you must not read, use or disseminate the information. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Gottex Group of Companies for any loss or damage arising in any way from its use.\n\n\n-----Original Message-----\nFrom: Edmondo Porcu \nSent: mardi 14 juin 2011 16:46\nTo: 'PJ Weisberg'; David Barr\nCc: git@vger.kernel.org\nSubject: RE: Objects deleted before first commit\n\nDear all,\nI have tried to copy my objects folder into my git root folder.\n\nD:\\vce\\GottwareNet>git cat-file -p 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\nfatal: Not a valid object name 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n\nD:\\vce\\GottwareNet>ls 00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n00\\1cd91a8a3a3c99ca7aea73c96b3d2174430947\n\nPlease help me we are talking about thousands of line of code!!! :(\n\nEdmondo Porcu\nFinancial  software architect\n\n\n\nAvenue de Rhodanie 48\n1007 Lausanne\nSwitzerland.\n\nDir  +41 (0) 21  560 30 82\nFax +41 (0) 21  617 71 55\nEmail : edmondo.porcu@gottexbrokers.com\n\nThe information in this email is confidential and may be legally privileged. If you are not the intended recipient, you must not read, use or disseminate the information. Although this email and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by the Gottex Group of Companies for any loss or damage arising in any way from its use.\n\n\n-----Original Message-----\nFrom: PJ Weisberg [mailto:pjweisberg@gmail.com] \nSent: mardi 14 juin 2011 16:44\nTo: David Barr\nCc: Edmondo Porcu; git@vger.kernel.org\nSubject: Re: Objects deleted before first commit\n\nOn Tuesday, June 14, 2011, David Barr <davidbarr@google.com> wrote:\n> On Tue, Jun 14, 2011 at 11:00 PM, Edmondo Porcu\n> <Edmondo.Porcu@gottexbrokers.com> wrote:\n>> dangling blob 43cb00bb9f23b73afc874c4105b136f8c426e4a5\n>> dangling blob 48ef642adb1549ee1d4040ec9337d3a47c19d422\n> [...]\n>\n> Was it 'rm -rf' or 'git rm -rf'?\n> If just the non-git command, maybe 'git checkout -- <missing paths>'?\n\nNot if it was never checked in, unfortunately.\n\n'git cat-file -p <hash>' prints the contents of the file.  It's up to\nyou to figure out which is the version you want and what the filenames\nwere.\n\n-- \n\n-PJ\n\n______________________________________________________________________\nThis email has been scanned by the MessageLabs Email Security System.\nFor more information please visit http://www.messagelabs.com/email \n______________________________________________________________________\n"},{"id":"170162","messageId":"4DFA69B9.3020605@dbservice.com","threadId":"27622","inReplyTo":"BANLkTin9_jfvtYdCsJLiWAoOvO2e1f=9SA@mail.gmail.com","subject":"Re: Objects deleted before first commit","fromName":"Tomas Carnecky","fromEmail":"tom@dbservice.com","sentAt":"2011-06-16T20:38:17Z","receivedAt":"2011-06-16T20:38:17Z","isPatch":false,"sender":{"key":"tom@dbservice.com","avatar":"https://gravatar.com/avatar/900a300bdd1a8bbe086008ad78210bbee2ad2803b7d50a5cba04c1e9404bd6d2?d=mp&s=160"},"body":"On 6/14/11 4:44 PM, PJ Weisberg wrote:\n> On Tuesday, June 14, 2011, David Barr<davidbarr@google.com>  wrote:\n>> On Tue, Jun 14, 2011 at 11:00 PM, Edmondo Porcu\n>> <Edmondo.Porcu@gottexbrokers.com>  wrote:\n>>> dangling blob 43cb00bb9f23b73afc874c4105b136f8c426e4a5\n>>> dangling blob 48ef642adb1549ee1d4040ec9337d3a47c19d422\n>> [...]\n>>\n>> Was it 'rm -rf' or 'git rm -rf'?\n>> If just the non-git command, maybe 'git checkout --<missing paths>'?\n> Not if it was never checked in, unfortunately.\n\nYou don't need to commit the file. If you add files with `git add` and \nthen delete them with plain `rm`, you can recover them with a simple \n`git checkout`, just like David suggested. See this transcript:\n\n$ git init tmp\nInitialized empty Git repository in <snip>/tmp/.git/\n$ cd tmp\n$ touch file\n$ git add file\n$ rm file\n$ ls file\nls: file: No such file or directory\n$ git checkout -- file\n$ ls file\nfile\n$\n"}]}