Repository navigation
Sync: use a dotfiles repo that is already cloned and has data - #25
Merged
Merged
Conversation
- Setup > Use an Existing Local Repo: pick the folder, see remote/branch/ layout/dotfile count, then link it. Any git host; gh only for GitHub remotes. - Understand mirror and GNU Stow-style layouts (new layout module). - Push stages/commits only the files DFM copied instead of git add -A. - Pull installs only dotfiles, skips scripts/READMEs/CI files and files identical to home, and previews exactly that. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UB8ouAGs45EfpwJjttj6yY
VictorGSchneider
added a commit
that referenced
this pull request
Oct 16, 2026
## Resumo Publica a versão **2.2.0**: a opção de usar um repositório de dotfiles que já existe e já está clonado (#25). ## Mudanças - `dfm/__init__.py`: `__version__` passa de `2.1.0` para `2.2.0` (fonte única da versão; `setup.py`, `dfm --version` e o diálogo Sobre leem dali). - `CHANGELOG.md`: as notas de `[Unreleased]` passam para `## [2.2.0]` e os links de comparação são atualizados. ## O que entra na 2.2.0 - **Added:** "Use an Existing Local Repo" em GitHub Sync > Setup, para qualquer host git. O `gh` só é exigido para remotes do GitHub. Reconhece repos no formato espelho da home e no estilo GNU Stow. - **Changed:** o Push faz stage e commit só dos arquivos que o DFM copiou, em vez de `git add -A`. O Pull instala só dotfiles (nomes que começam com ponto) e pula arquivos idênticos aos da home. ## Teste - [x] `python -m unittest tests.test_version` (versão, CHANGELOG e links coerentes) - [x] CI verde ## Depois do merge Criar e enviar a tag a partir da `main`, o que dispara o workflow `Release` e publica o "DFM 2.2.0" com as notas desta seção: git fetch origin git tag -a v2.2.0 origin/main -m "DFM 2.2.0" git push origin v2.2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
GitHub Sync could only create a new repo or clone
<user>/dotfilesinto~/.dotfiles. Someone who already keeps their dotfiles in a cloned repo (elsewhere, with data, maybe not on GitHub) had no way to use it. Looking at the code also showed that pointing DFM at such a repo would have been unsafe: Pull copied every file in the repo into~(aninstall.shorscripts/would land in the home folder) and Push rangit add -A, committing unrelated work in progress.What
~/.dotfiles,~/dotfiles... when one exists). DFM validates it is the root of a git clone, shows remote, branch, layout, number of dotfiles and uncommitted changes, and links it after confirmation. No network;ghis only required when the remote is on github.com (require_remote_access).dfm/core/github_sync/layout.py):mirror(files laid out like~, what DFM creates) and GNU Stow-style (zsh/.zshrc). In a stow repo a tracked file keeps its package; new files go in adfm/package..git*,.github...), skips files identical to home (no pointless backups), and the preview dialog uses the same logic (pull_preview).[Unreleased]) updated.Test plan
tests/test_existing_repo.py): linking a clone with data, nogh, non-repo / missing / subfolder / no-remote / dirty cases, layout detection and mapping, pull ignoringinstall.sh/README/scripts/.github, stow pull and push, push committing only DFM files, no-change push, diff previewGtk.FileDialog) needs a desktop session; not exercised headlessNot covered: stow packages that keep dotfiles in non-dot top-level paths (e.g.
bin/), and chezmoi-style repos (dot_bashrc).🤖 Generated with Claude Code
https://claude.ai/code/session_01UB8ouAGs45EfpwJjttj6yY
Generated by Claude Code