{"id":19030344,"url":"https://github.com/chmouel/consult-vc-modified-files","last_synced_at":"2025-07-25T08:04:06.823Z","repository":{"id":201132161,"uuid":"707033604","full_name":"chmouel/consult-vc-modified-files","owner":"chmouel","description":"List git modified files in a project with vc","archived":false,"fork":false,"pushed_at":"2025-07-24T22:21:29.000Z","size":91,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-25T04:31:13.059Z","etag":null,"topics":["consult","emacs","emacs-lisp","emacs-mode","git"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chmouel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-19T05:06:55.000Z","updated_at":"2025-07-24T22:21:33.000Z","dependencies_parsed_at":"2025-02-25T12:26:08.064Z","dependency_job_id":"b186d069-137a-4e1a-bf21-0bc152017b9b","html_url":"https://github.com/chmouel/consult-vc-modified-files","commit_stats":null,"previous_names":["chmouel/consult-vc-modified-files"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/chmouel/consult-vc-modified-files","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fconsult-vc-modified-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fconsult-vc-modified-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fconsult-vc-modified-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fconsult-vc-modified-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chmouel","download_url":"https://codeload.github.com/chmouel/consult-vc-modified-files/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chmouel%2Fconsult-vc-modified-files/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266977701,"owners_count":24015478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["consult","emacs","emacs-lisp","emacs-mode","git"],"created_at":"2024-11-08T21:17:37.261Z","updated_at":"2025-07-25T08:04:06.777Z","avatar_url":"https://github.com/chmouel.png","language":"Emacs Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![MELPA](https://stable.melpa.org/packages/consult-vc-modified-files-badge.svg)](https://stable.melpa.org/#/consult-vc-modified-files)\n\n# 🔍 consult-vc-modified-files\n\n`consult-vc-modified-files` provides a easy way to list Git-tracked files that have been modified, newly added, or are part of the HEAD commit in a project.\n\nIt integrates with Emacs' built-in [vc](https://www.gnu.org/software/emacs/manual/html_node/emacs/Version-Control.html) and\n[diff-mode](https://github.com/emacs-mirror/emacs/blob/master/lisp/vc/diff-mode.el) libraries,\nas well as the [consult](https://github.com/minad/consult) package for navigation.\n\n## ✨ Features\n\n- 📄 View **locally modified** files in the current Git project\n- 📦 List files from the HEAD commit\n- 🆕 List newly added (untracked) files separately\n- 📋 Show files **staged for commit** in the Git staging area\n- �️ Select and explore files from **any past commit** with diff previews\n- �🛠️ Customize sources for specific use cases\n- 🧭 Navigate the open files with `consult`\n- 👁️ Preview the diff or the commit for the current selection\n- 🔄 Smart preview window management (no more duplicate preview windows!)\n- 🔍 Show the commit message of the modified files in HEAD\n- 🧵 Narrow to the right type of files with the `consult-narrow-key` (`\u003e` by\n  default):\n  - `h` for modified in HEAD\n  - `a` added (untracked) files\n  - `l` modified locally\n  - `c` staged for commit.\n\n\u003e [!CAUTION]\n\u003e This only works with Git repositories and no other version control systems.\n\n## 📸 Screenshot\n\n![screenshot-consult-vc-modified-files](https://github.com/user-attachments/assets/6de35d17-4598-4727-a7b2-07dde993f002)\n\n### Preview with git show the HEAD files and git diff the modified files\n\n\u003chttps://github.com/user-attachments/assets/daa339f0-0311-4444-a3a7-a720335b6e4d\u003e\n\n### Browse modified files of a commit with `consult-vc-log-select-files`\n\n\u003chttps://github.com/user-attachments/assets/8b452648-6298-45d7-8290-6138d3b0cab2\u003e\n\n## 📥 Installation\n\n### Using `use-package` and [MELPA](https://melpa.org/)\n\n```elisp\n(use-package consult-vc-modified-files\n  :bind\n  ;; choose any other key bindings you prefer\n  ((\"C-x v /\" . consult-vc-modified-files)\n   (\"C-x v .\" . consult-vc-log-select-files)))\n```\n\n## 🚀 Usage\n\n### Browsing Modified Files\n\nCall the interactive function `consult-vc-modified-files`, or use a key binding\nlike `C-x v /` (if configured with the configuration above).\n\nWhen invoked, the command show a prompt for selecting files based on customizable sources:\n\n- 🔄 **Modified locally**: Lists locally modified or untracked files\n- 🆕 **Added files**: Lists new untracked files\n- 📋 **Staged for commit**: Lists files added to the Git staging area\n- 📦 **Modified in HEAD**: Lists files modified in the HEAD commit\n\n### Browsing Files from a Specific Commit\n\nCall the interactive function `consult-vc-log-select-files` to:\n\n1. Select a commit from the repository history\n2. Choose a file that was modified in that commit\n3. See a live diff preview of the changes made to that file in the commit\n\nThis is useful for reviewing changes from past commits without having to use a separate git tool.\n\nYou can customize the available sources using the\n`consult-vc-modified-files-sources` variable.\n\n## 🔮 Preview Features\n\n- 📊 **Live diff preview**: See the changes in each file as you navigate through options\n- 🧠 **Commit diff preview**: View exact changes made to files in any historical commit\n- 🌈 **Syntax highlighting**: Previews use diff-mode\n\n## ⚙️ Customization\n\n### Configure Sources\n\nYou can customize which file categories appear in the selection when using\n`consult-vc-modified-files` by setting the `consult-vc-modified-files-sources`\nvariable. This allows you to control exactly which types of files are presented\nin the interface.\n\nFor example, if you want to show all modified files *except* those modified in\nbranch heads:\n\n```elisp\n(setq consult-vc-modified-files-sources\n      '(consult-vc-modified-files-source-modified-files\n        consult-vc-modified-files-source-added-files\n        consult-vc-modified-files-source-staged-files))\n```\n\nThis configuration includes:\n\n- Modified files (tracked files with changes)\n- Added files (new untracked files)\n- Staged files (changes ready for commit)\n\nBut it excludes files modified in branch heads.\n\n### Display Git Commit Messages when showing the HEAD files\n\nYou can control whether to show commit message descriptions for files modified\nin HEAD with the `consult-vc-modified-files-show-description` customization\noption:\n\n```elisp\n(setq consult-vc-modified-files-show-description t)  ;; Show descriptions (default is nil)\n```\n\nWhen enabled, this option displays the commit message next to each file modified\nin the HEAD commit, providing more context about the changes.\n\n- When `t`: Shows commit message descriptions for HEAD files\n- When `nil`: Shows only the filenames without descriptions\n\n### Customize Faces\n\nAdjust the appearance of listed files by customizing:\n\n- 🎨 `consult-vc-modified-files-face`: For locally modified files\n- 🎭 `consult-vc-modified-head-files-face`: For files modified in HEAD\n- 🚩 `consult-vc-modified-files-added-face`: For new (untracked) files\n- 📋 `consult-vc-modified-files-staged-face`: For files staged for commit\n\n## 👥 Authors\n\n### Chmouel Boudjnah\n\n- 🐘 **Fediverse**: [@chmouel@chmouel.com](https://fosstodon.org/@chmouel) (preferred)\n- 🐦 **Twitter**: [@chmouel](https://twitter.com/chmouel)\n- 📝 **Blog**: [https://blog.chmouel.com](https://blog.chmouel.com)\n\n## 📃 License\n\nThis project is licensed under the [GPL-3.0](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmouel%2Fconsult-vc-modified-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchmouel%2Fconsult-vc-modified-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchmouel%2Fconsult-vc-modified-files/lists"}