{"thread":{"id":"26112","subject":"Re: Basic Git Questions","startedAt":"2010-12-20T19:21:52Z","lastAt":"2010-12-21T02:59:38Z","messageCount":2,"participants":["George Spelvin","Adam Kellas"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"158409","messageId":"20101220192152.4509.qmail@science.horizon.com","threadId":"26112","inReplyTo":null,"subject":"Re: Basic Git Questions","fromName":"George Spelvin","fromEmail":"linux@horizon.com","sentAt":"2010-12-20T19:21:52Z","receivedAt":"2010-12-20T19:21:52Z","isPatch":false,"sender":{"key":"linux@horizon.com","avatar":null},"body":"> 1. I generally add the files in my working directory using \"git add\n> .\". But sometimes you want to add all the files except 1 or 2 file. Is\n> there a shortcut way we can tell git to add all the files but exclude\n> a particular file.\n\nOthers have pointed out the general techniques, but a few additional\nthings that may be useful in some situations:\n\n1) .gitignore.  If the files are such that you never want git to pay\n   attention to them, you can add them to the .gitignore file.\n2) \"git add -u\".  This adds only files that git is already tracking,\n   and ignores truly new files.\n3) \"git add -i\".  This lets you pick the files to be added from a list.\n4) \"git gui\".  This lets you click on the files to be added.\n   It's my preferred way to do a selective commit.\n"},{"id":"158426","messageId":"iep54u$tqp$1@dough.gmane.org","threadId":"26112","inReplyTo":"20101220192152.4509.qmail@science.horizon.com","subject":"Re: Basic Git Questions","fromName":"Adam Kellas","fromEmail":"adam.kellas@gmail.com","sentAt":"2010-12-21T02:59:38Z","receivedAt":"2010-12-21T02:59:38Z","isPatch":false,"sender":{"key":"adam.kellas@gmail.com","avatar":null},"body":"On 12/20/2010 2:21 PM, George Spelvin wrote:\n> 1) .gitignore.  If the files are such that you never want git to pay\n>     attention to them, you can add them to the .gitignore file.\n\nMy own preferred pattern is to flip the default: I put a '*' in \n.gitignore and use \"add -f\" when I want files tracked.\n\nAK\n"}]}