From: "George Spelvin" <linux@horizon.com>
To: paragkalra@gmail.com
Cc: git@vger.kernel.org, linux@horizon.com
Subject: Re: Basic Git Questions
Date: 20 Dec 2010 14:21:52 -0500 [thread overview]
Message-ID: <20101220192152.4509.qmail@science.horizon.com> (raw)
> 1. I generally add the files in my working directory using "git add
> .". But sometimes you want to add all the files except 1 or 2 file. Is
> there a shortcut way we can tell git to add all the files but exclude
> a particular file.
Others have pointed out the general techniques, but a few additional
things that may be useful in some situations:
1) .gitignore. If the files are such that you never want git to pay
attention to them, you can add them to the .gitignore file.
2) "git add -u". This adds only files that git is already tracking,
and ignores truly new files.
3) "git add -i". This lets you pick the files to be added from a list.
4) "git gui". This lets you click on the files to be added.
It's my preferred way to do a selective commit.
next reply other threads:[~2010-12-20 19:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 19:21 George Spelvin [this message]
2010-12-21 2:59 ` Basic Git Questions Adam Kellas
-- strict thread matches above, loose matches on Subject: below --
2010-12-19 22:32 Parag Kalra
2010-12-19 23:08 ` Konstantin Khomoutov
2010-12-19 23:15 ` Thomas Rast
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101220192152.4509.qmail@science.horizon.com \
--to=linux@horizon.com \
--cc=git@vger.kernel.org \
--cc=paragkalra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).