Q&A
Short answers to what people ask before they install it.
| Page | What it covers |
|---|---|
| Why not use a worktree? | Use one when the tracked files are all you need. A worktree shares one repository, which is why it costs almost nothing and why it carries almost nothing: no dependencies, no build output, no initialised submodules, and a branch that no second worktree may check out. |
| Does this work on Linux? | The script is POSIX and uses no BSD-only spelling, so the reflink path calls cp --reflink=always and reads free space through df -k. It has not been run on Linux. The probe measures what a copy actually consumed, so a filesystem it guesses wrong about refuses the clone rather than making a full copy of 13 GB. |
| What happens on ext4? | It refuses and says why. ext4 has no way to share blocks between two files, so every copy would cost the full size. |
| Can I run it from inside a clone? | Yes, and what you get is another clone of the same canonical. Each clone records where it came from in a .gitto file, so every command resolves the canonical from wherever you are standing, and a chain of clones of clones cannot form. |
| How do I undo one? | gitto remove <name>, which refuses while anything would be lost. There is nothing else to clean up: a clone is one directory, and removing it leaves the canonical untouched. |
| What if the canonical moves? | Every clone records the path it came from, so they report that the canonical is missing. Move it back, or make fresh clones from its new location. |
| Does it need GitHub, or a remote at all? | new runs git fetch before it resolves the default base, so a repository with no remote needs an explicit base, such as gitto new auth-fix HEAD. Nothing else in the tool reaches the network. |
| How is this different from a fresh git clone? | A clone from a remote downloads the history again and gives you a checkout with nothing built in it. This copies the local directory, including everything git does not track, and pays for neither the download nor the build. |
Measuring the filesystem
Before any of that, `gitto` writes a 32 MB probe file, clones it with the system call, and compares free space before and after. A copy that consumed the probe's own size was a full copy, whatever the exit status said.
Why not use a worktree?
Use one when the tracked files are all you need. A worktree shares one repository, which is why it costs almost nothing and why it carries almost nothing: no dependencies, no build output, no initialised submodules, and a branch that no second worktree may check out.