git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Don't share anything but those files

From
Nick Douma <n.douma@nekoconeko.nl>
Date
Jul 17, 2012, 08:37 UTC
Message-ID
<50052448.5060407@nekoconeko.nl>
In-Reply-To
<5000334C.5030505@modusfx.com>
Hoi,
On 13-07-12 16:40, Yves Perron wrote:
Show 6 quoted lines
> I'm wondering how to commit only selected files/folders on GIT, if even
> possible. Note, the ignore list is not a good option for me as I'd like
> to add a few files in a folder that contains many hundreds for instance.
> 
> Basically, I'm looking for a way to say, don't share anything but those
> files.
I would use a .gitignore with something like:

cat <<EOF > .gitignore # Ignore everything * # Except !/.gitignore !/path/to/file/1 !/path/to/file/2 EOF

Only the two specified files and the .gitignore file should be shown in `git status` now.

Kind regards,
Nick Douma
Previous: Yves Perron
Message 2 of 2 in “Don't share anything but those files”
  1. Yves PerronJul 13, 2012
  2. Nick DoumaJul 17, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.