Re: How to add folder NON RECURSIVELY ?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: How to add folder NON RECURSIVELY ?

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:53:27

"J. Bakshi" [off-list ref] writes:
Could you please suggest how can I add foo/dir1/file1 ?

guess

touch foo/dir1/.gitignore
git add foo/dir1/
Not if you want only "file1" to be added. As I said, Git doesn't know
and doesn't want to know about directories. So "git add directory/" is
just a shorthand that adds all (non-ignored) files in this directory.
git add foo/dir1/file1
This last line alone will do it.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

Re: How to add folder NON RECURSIVELY ?

From: J. Bakshi <hidden>
Date: 2016-06-15 22:53:27

On Tue, 03 Apr 2012 15:15:37 +0200
Matthieu Moy [off-list ref] wrote:
"J. Bakshi" [off-list ref] writes:
quoted
Could you please suggest how can I add foo/dir1/file1 ?

guess

touch foo/dir1/.gitignore
git add foo/dir1/
Not if you want only "file1" to be added. As I said, Git doesn't know
and doesn't want to know about directories. So "git add directory/" is
just a shorthand that adds all (non-ignored) files in this directory.
quoted
git add foo/dir1/file1
This last line alone will do it.
Thanks a lot to all of you for your valuable suggestion.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help