From: Duy Nguyen Date: Mon, 26 May 2014 22:19:05 GMT Subject: Re: Can we stage all files using "git add" command, except some specific files ? Message-ID: In-Reply-To: <8392138.j8Dle5WGbS@linux-wzza.site> On Tue, May 27, 2014 at 1:03 AM, Arup Rakshit wrote: > Now, you can see, I have staged all the files first using *git add -A*, then > _unstaging_ those I don't want to _stage_ right now. Now can this be done, in > the *staging* time ? I mean any way to tell `git add` command, that add all > the files from the current directory, except some specific files. What I want > this is, some times I have at least 30 files, whereas I want to _stage_ say, 20 > files, not the rest 10. During _staging_ can I tell *git add* the same. I used > *git add -h*, which didn't show me any such hints about my need. Try "git add -A :/ :! :!" which basically says add all files in repo _except_ those that match pattern1, or pattern2... I assume you can classify "the rest 10" because there's no way to express "Adding all except the rest 10". -- Duy