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

Re: [RFC/PATCH] Implement git-cp.

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Feb 10, 2008, 12:42 UTC
Message-ID
<20080210124252.GN25954@genesis.frugalware.org>
In-Reply-To
<alpine.LSU.1.00.0802101230160.11591@racer.site>
On Sun, Feb 10, 2008 at 12:33:33PM +0000, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> But your comment made me think again: It's better to "cp" those 
> files/directories, and then "git add" the relevant ones.  It even avoids 
> stupid mistakes where you commit something you "cp"ed, but did not need.

that's exactly why i think git-cp makes sense. git cp copies the directory tree and adds the tracked files to the index. if you use cp -R to copy the directory tree then git add, you can easily add untracked files, while git cp avoids this.

if you count gitignore, then it's like: why having git commit -a if we have git add -u and git commit?

(if i'm right you mean: use cp -R and git add, instead of git cp)
thanks
- VMiklos
Previous: Johannes SchindelinNext: Robin Rosenberg
Message 8 of 14 in “What about git cp ?”
  1. Francis MoreauFeb 3, 2008
  2. Matthieu MoyFeb 3, 2008
  3. Jakub NarebskiFeb 3, 2008
  4. Implement git-cp.Miklos Vajna, Feb 10, 2008
  5. Johannes SchindelinFeb 10, 2008
  6. Junio C HamanoFeb 10, 2008
  7. Johannes SchindelinFeb 10, 2008
  8. Miklos VajnaFeb 10, 2008
  9. Robin RosenbergFeb 10, 2008
  10. Jakub NarebskiFeb 11, 2008
  11. Matthieu MoyFeb 11, 2008
  12. Miklos VajnaFeb 11, 2008
  13. Implement git-cp.Miklos Vajna, Feb 10, 2008
  14. Remi VanicatFeb 3, 2008

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.