{"thread":{"id":"20734","subject":"Re: git only one file","startedAt":"2009-08-25T21:29:28Z","lastAt":"2009-08-26T04:30:42Z","messageCount":2,"participants":["Giuseppe Bilotta"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"121755","messageId":"1251235768-24921-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"20734","inReplyTo":"synhedionn@gmail.com","subject":"Re: git only one file","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-08-25T21:29:28Z","receivedAt":"2009-08-25T21:29:28Z","isPatch":false,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"synhedionn <synhedionn@gmail.com> wrote:\n\n> with git add . Â , a directory is expected, but I don't need all my files to\n> be recorded, only one of my thousands, so how can I record just 1 file?\n\nGenerally, if you want to track a single file in a directory you just\nadd that file, as per Matthias' suggestion, and possibly create a\n.gitignore with the single '*' pattern in it..\n\n<shameless plug>\nHowever, if you want to track more than one _independent_ files in the\nsame directory (RCS-style), then I would recommend you look into zit,\nthe Git-based single-file content tracker I've developed. You can find\nit at git://git.oblomov.eu/zit ( gitweb at http://git.oblomov.eu/zit )\n</shameless plug>\n"},{"id":"121769","messageId":"cb7bb73a0908252130u792a328bta1e186ff8f5454b8@mail.gmail.com","threadId":"20734","inReplyTo":"a7c6f4d60908251605l5fb771a5t79b27cf688fab205@mail.gmail.com","subject":"Re: git only one file","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-08-26T04:30:42Z","receivedAt":"2009-08-26T04:30:42Z","isPatch":false,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Wed, Aug 26, 2009 at 1:05 AM, syn hedionn<synhedionn@gmail.com> wrote:\n> ok , but if I put,\n> git add index.htm\n> I have:\n> fatal: Not a git repository\n\nYou need to initialize the repository before you can add files to it, so:\n\ngit init\ngit add index.htm\ngit commit -m \"Initial commit\"\n\nThe zit way would be:\n\nzit track index.htm\nzit commit -m \"Initial commit\" index.htm\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"}]}