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

Re: New directory lost by git am

From
PSPhillip Susi <psusi@ubuntu.com>
Date
Mar 5, 2014, 03:22 UTC
Message-ID
<53169868.3010401@ubuntu.com>
In-Reply-To
<53169549.10309@gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 03/04/2014 10:08 PM, Chris Packham wrote:
> Could you provide a few more details such as your git version (git 
> --version) and an example of the failure. I've tried to reproduce
> the problem based on the description provided but everything seems
> to work as expected for me.
Version 1.8.3.2.
Show 10 quoted lines
> git --version git version 1.9.0 mkdir test && cd test && git init 
> echo "hello world" >a.txt git add a.txt git commit -m"Initial
> commit" git checkout -b temp mkdir b echo "lorem ipsum" >b/b.txt 
> git add b/b.txt git commit -m"Add b/b.txt" ls -R .: a.txt  b
> 
> ./b: b.txt git checkout master git format-patch temp -1 --stdout |
> git am ls -R .: a.txt  b
> 
> ./b: b.txt
> 

You are reapplying the patch while it is already applied. Do a reset HEAD~1 --hard, and git clean -x -f -d before git am. I didn't notice the missing file myself for some time because it is left in the working tree, just not added to the index and included in the commit.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCgAGBQJTFphoAAoJEI5FoCIzSKrwx78H/iTLvtMVb2hmn2g2YDQuJWe3 nENrqlRNDF11YHpA9c7chxepcuP2CZaZjoXv45aCQG9Wx9XJyKPIbauhwqIIVUjR VYDORdtpn8u3Pf3WWyHYW+MEoupYyni4VYENVSjKnV6sLT951TuYI+4paHWat3lq /at9UkLy4d39hj2P/6M+voBbKWzblBZzP31lH6OY/Mno2zhh4eQChhsnZYPQ/Hfn REAeyB4WsLCjnPz+uEkOcWaEVVh+BwNU1UmK/tX+rzhBsaRzhDY5IIWTL9dfkD/z Af86IUSKdTjnMq7CTmVAmlxAfHXF0bgtlybrVY2Sdc8R/CqmWCz6USyKdUxgLIk= =Z3Z/ -----END PGP SIGNATURE-----

Previous: Chris PackhamNext: Chris Packham
Message 3 of 10 in “New directory lost by git am”
  1. Phillip SusiMar 5, 2014
  2. Chris PackhamMar 5, 2014
  3. Phillip SusiMar 5, 2014
  4. Chris PackhamMar 5, 2014
  5. Phillip SusiMar 5, 2014
  6. Jeff KingMar 5, 2014
  7. Phillip SusiMar 5, 2014
  8. Jeff KingMar 5, 2014
  9. Phillip SusiMar 5, 2014
  10. Junio C HamanoMar 5, 2014

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.