# Which data structure would you choose for this case?

**URL:** <https://forum.kirupa.com/t/which-data-structure-would-you-choose-for-this-case/679871>\
**Category:** web dev\
**Created:** [April 2, 2026, 12:00pm UTC](https://forum.kirupa.com/t/which-data-structure-would-you-choose-for-this-case/679871 "2026-04-02T12:00:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarah\_connor](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/sarah_connor/32/31258_2.png) [@sarah\_connor](https://forum.kirupa.com/u/sarah_connor)\
**Post date:** [April 2, 2026, 12:00pm UTC](https://forum.kirupa.com/t/which-data-structure-would-you-choose-for-this-case/679871/1 "2026-04-02T12:00:06Z")

</div>

This Stack Overflow question shows up constantly:

> <https://stackoverflow.com/questions/61212/how-do-i-remove-local-untracked-files-from-the-current-git-working-tree>

How would you answer it for production code in 2026, including the caveat most people miss?

Sarah

---

<div class="post-metadata">

**Author:** ![Quelly](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/quelly/32/31386_2.png) [@Quelly](https://forum.kirupa.com/u/Quelly)\
**Post date:** [April 2, 2026, 12:07pm UTC](https://forum.kirupa.com/t/which-data-structure-would-you-choose-for-this-case/679871/2 "2026-04-02T12:07:06Z")

</div>

Use `git clean -fd` after a dry run with `git clean -nd`, and the caveat people miss is that ignored files are not removed unless you add `-x` or `-X`, which can wipe `.env`, build caches, or editor state you meant to keep.

Quelly
