{"thread":{"id":"3069","subject":"Recursive remove","startedAt":"2006-01-13T13:21:19Z","lastAt":"2006-01-13T19:51:24Z","messageCount":5,"participants":["Peter Eriksen","sean","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"14611","messageId":"20060113132119.GB23655@ebar091.ebar.dtu.dk","threadId":"3069","inReplyTo":null,"subject":"Recursive remove","fromName":"Peter Eriksen","fromEmail":"s022018@student.dtu.dk","sentAt":"2006-01-13T13:21:19Z","receivedAt":"2006-01-13T13:21:19Z","isPatch":false,"sender":{"key":"s022018@student.dtu.dk","avatar":null},"body":"Hello,\n\nA way to recursively remove a directory /Some/Dir/ is a follows:\n\n   git ls-files -z Some/Dir >rmfiles\n   git update-index -z --force-remove --stdin <rmfiles\n   git commit -a -m \"Remove directory Some/Dir\"\n   rm -rf Some/Dir\n\nWhat is a better way to do it?\n\nRegards,\n\nPeter\n"},{"id":"14612","messageId":"BAYC1-PASMTP095A70114DD0A50FA6CAFAAE260@CEZ.ICE","threadId":"3069","inReplyTo":"20060113132119.GB23655@ebar091.ebar.dtu.dk","subject":"Re: Recursive remove","fromName":"sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-01-13T14:03:01Z","receivedAt":"2006-01-13T14:03:01Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Fri, 13 Jan 2006 14:21:19 +0100\n\"Peter Eriksen\" <s022018@student.dtu.dk> wrote:\n\n> Hello,\n> \n> A way to recursively remove a directory /Some/Dir/ is a follows:\n> \n>    git ls-files -z Some/Dir >rmfiles\n>    git update-index -z --force-remove --stdin <rmfiles\n>    git commit -a -m \"Remove directory Some/Dir\"\n>    rm -rf Some/Dir\n> \n> What is a better way to do it?\n> \n\nHi Peter,\n\nThe following is a bit more concise but not better than your version:\n\nrm -rf Some/Dir\ngit ls-files -z -d Some/Dir | git-update-index -z --remove --stdin\ngit commit -m \"Remove directory Some/Dir\"\n\n\nGit could stand to have an \"rm\" command to make this easier.\n\n\nSean\n"},{"id":"14617","messageId":"7virso9ggd.fsf@assigned-by-dhcp.cox.net","threadId":"3069","inReplyTo":"20060113132119.GB23655@ebar091.ebar.dtu.dk","subject":"Re: Recursive remove","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-13T17:37:54Z","receivedAt":"2006-01-13T17:37:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Peter Eriksen\" <s022018@student.dtu.dk> writes:\n\n> A way to recursively remove a directory /Some/Dir/ is a follows:\n>\n>    git ls-files -z Some/Dir >rmfiles\n>    git update-index -z --force-remove --stdin <rmfiles\n>    git commit -a -m \"Remove directory Some/Dir\"\n>    rm -rf Some/Dir\n>\n> What is a better way to do it?\n\n\t$ rm -fr Some/Dir; git commit -a -m 'Remove'\n\nperhaps?\n"},{"id":"14621","messageId":"BAYC1-PASMTP08F3875A7636E18401E7B3AE260@CEZ.ICE","threadId":"3069","inReplyTo":"7virso9ggd.fsf@assigned-by-dhcp.cox.net","subject":"Re: Recursive remove","fromName":"sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2006-01-13T17:56:04Z","receivedAt":"2006-01-13T17:56:04Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Fri, 13 Jan 2006 09:37:54 -0800\nJunio C Hamano <junkio@cox.net> wrote:\n\n> \n> \t$ rm -fr Some/Dir; git commit -a -m 'Remove'\n> \n> perhaps?\n> \n\nSigh, its been a humbling morning all around; can't get easier than that.\n\nSean\n"},{"id":"14628","messageId":"7vslrr6h4z.fsf@assigned-by-dhcp.cox.net","threadId":"3069","inReplyTo":"BAYC1-PASMTP08F3875A7636E18401E7B3AE260@CEZ.ICE","subject":"Re: Recursive remove","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-01-13T19:51:24Z","receivedAt":"2006-01-13T19:51:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"sean <seanlkml@sympatico.ca> writes:\n\n> On Fri, 13 Jan 2006 09:37:54 -0800\n> Junio C Hamano <junkio@cox.net> wrote:\n>> \n>> \t$ rm -fr Some/Dir; git commit -a -m 'Remove'\n>> \n>> perhaps?\n>\n> Sigh, its been a humbling morning all around; can't get easier than that.\n\nPerhaps this is because I did not do a good job in\nDocumentation/git-commit.txt.  Something like this?\n\n-- >8 --\nDocumentation: git-commit -a\n\nA bit more elaboration on what \"update all paths\" means.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n\n---\ndiff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt\nindex e0ff74f..e35984d 100644\n--- a/Documentation/git-commit.txt\n+++ b/Documentation/git-commit.txt\n@@ -25,7 +25,9 @@ information.\n OPTIONS\n -------\n -a|--all::\n-\tUpdate all paths in the index file.\n+\tUpdate all paths in the index file.  The command with this flag\n+\tnotices files that have been modified and deleted, but new files\n+\tyou have not told about git are not affected.\n \n -c or -C <commit>::\n \tTake existing commit object, and reuse the log message\n"}]}