* git only one file
@ 2009-08-25 19:12 synhedionn
2009-08-25 19:38 ` Matthias Kestenholz
2009-10-02 17:24 ` gsky
0 siblings, 2 replies; 5+ messages in thread
From: synhedionn @ 2009-08-25 19:12 UTC (permalink / raw)
To: git
with git add . , a directory is expected, but I don't need all my files to
be recorded, only one of my thousands, so how can I record just 1 file?
--
View this message in context: http://www.nabble.com/git-only-one-file-tp25140456p25140456.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git only one file
2009-08-25 19:12 git only one file synhedionn
@ 2009-08-25 19:38 ` Matthias Kestenholz
2009-10-02 17:24 ` gsky
1 sibling, 0 replies; 5+ messages in thread
From: Matthias Kestenholz @ 2009-08-25 19:38 UTC (permalink / raw)
To: synhedionn; +Cc: git
On Tue, Aug 25, 2009 at 9:12 PM, synhedionn<synhedionn@gmail.com> wrote:
>
> with git add . , a directory is expected, but I don't need all my files to
> be recorded, only one of my thousands, so how can I record just 1 file?
By only adding this file to the index. Use "git add $yourfile" instead
of "git add ."
If you do not want to see your thousands of files in the directory
when running git status, you can simply create a .gitignore file with
* as content. Git will still notify you about files which it already
knows about, even though the .gitignore entry tells it to ignore
everything.
Matthias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git only one file
2009-08-25 19:12 git only one file synhedionn
2009-08-25 19:38 ` Matthias Kestenholz
@ 2009-10-02 17:24 ` gsky
1 sibling, 0 replies; 5+ messages in thread
From: gsky @ 2009-10-02 17:24 UTC (permalink / raw)
To: git
synhedionn wrote:
>
> with git add . , a directory is expected, but I don't need all my files
> to be recorded, only one of my thousands, so how can I record just 1 file?
>
git add /path/to/file
--
View this message in context: http://www.nabble.com/git-only-one-file-tp25140456p25718014.html
Sent from the git mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git only one file
[not found] ` <a7c6f4d60908251605l5fb771a5t79b27cf688fab205@mail.gmail.com>
@ 2009-08-26 4:30 ` Giuseppe Bilotta
0 siblings, 0 replies; 5+ messages in thread
From: Giuseppe Bilotta @ 2009-08-26 4:30 UTC (permalink / raw)
To: syn hedionn; +Cc: git
On Wed, Aug 26, 2009 at 1:05 AM, syn hedionn<synhedionn@gmail.com> wrote:
> ok , but if I put,
> git add index.htm
> I have:
> fatal: Not a git repository
You need to initialize the repository before you can add files to it, so:
git init
git add index.htm
git commit -m "Initial commit"
The zit way would be:
zit track index.htm
zit commit -m "Initial commit" index.htm
--
Giuseppe "Oblomov" Bilotta
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git only one file
[not found] <synhedionn <synhedionn@gmail.com>
@ 2009-08-25 21:29 ` Giuseppe Bilotta
[not found] ` <a7c6f4d60908251605l5fb771a5t79b27cf688fab205@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Bilotta @ 2009-08-25 21:29 UTC (permalink / raw)
To: git; +Cc: synhedionn
synhedionn <synhedionn@gmail.com> wrote:
> with git add . Â , a directory is expected, but I don't need all my files to
> be recorded, only one of my thousands, so how can I record just 1 file?
Generally, if you want to track a single file in a directory you just
add that file, as per Matthias' suggestion, and possibly create a
.gitignore with the single '*' pattern in it..
<shameless plug>
However, if you want to track more than one _independent_ files in the
same directory (RCS-style), then I would recommend you look into zit,
the Git-based single-file content tracker I've developed. You can find
it at git://git.oblomov.eu/zit ( gitweb at http://git.oblomov.eu/zit )
</shameless plug>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-02 17:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-25 19:12 git only one file synhedionn
2009-08-25 19:38 ` Matthias Kestenholz
2009-10-02 17:24 ` gsky
[not found] <synhedionn <synhedionn@gmail.com>
2009-08-25 21:29 ` Giuseppe Bilotta
[not found] ` <a7c6f4d60908251605l5fb771a5t79b27cf688fab205@mail.gmail.com>
2009-08-26 4:30 ` Giuseppe Bilotta
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.