{"thread":{"id":"31016","subject":"Don't share anything but those files","startedAt":"2012-07-13T14:40:12Z","lastAt":"2012-07-17T08:37:28Z","messageCount":2,"participants":["Yves Perron","Nick Douma"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"195009","messageId":"5000334C.5030505@modusfx.com","threadId":"31016","inReplyTo":null,"subject":"Don't share anything but those files","fromName":"Yves Perron","fromEmail":"yves.perron@modusfx.com","sentAt":"2012-07-13T14:40:12Z","receivedAt":"2012-07-13T14:40:12Z","isPatch":false,"sender":{"key":"yves.perron@modusfx.com","avatar":null},"body":"Greetings everyone,\n\nI'm wondering how to commit only selected files/folders on GIT, if even \npossible. Note, the ignore list is not a good option for me as I'd like \nto add a few files in a folder that contains many hundreds for instance.\n\nBasically, I'm looking for a way to say, don't share anything but those \nfiles.\n\nthx\n"},{"id":"195193","messageId":"50052448.5060407@nekoconeko.nl","threadId":"31016","inReplyTo":"5000334C.5030505@modusfx.com","subject":"Re: Don't share anything but those files","fromName":"Nick Douma","fromEmail":"n.douma@nekoconeko.nl","sentAt":"2012-07-17T08:37:28Z","receivedAt":"2012-07-17T08:37:28Z","isPatch":false,"sender":{"key":"n.douma@nekoconeko.nl","avatar":"https://gravatar.com/avatar/93ce45c81df3adf49c9d5ee27c2e27bcc519ea6b43ad60e31e070119ff2abd92?d=mp&s=160"},"body":"Hoi,\n\nOn 13-07-12 16:40, Yves Perron wrote:\n> I'm wondering how to commit only selected files/folders on GIT, if even\n> possible. Note, the ignore list is not a good option for me as I'd like\n> to add a few files in a folder that contains many hundreds for instance.\n> \n> Basically, I'm looking for a way to say, don't share anything but those\n> files.\n\nI would use a .gitignore with something like:\n\ncat <<EOF > .gitignore\n# Ignore everything\n*\n# Except\n!/.gitignore\n!/path/to/file/1\n!/path/to/file/2\nEOF\n\nOnly the two specified files and the .gitignore file should be shown in\n`git status` now.\n\nKind regards,\n\nNick Douma\n\n"}]}