Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the "Working on Windows" section of the docs to avoid potential data loss #5212

Open
AngelEzquerra opened this issue Dec 30, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation 🪟Windows

Comments

@AngelEzquerra
Copy link

Description

The Working on Windows section of the docs explains the (current) pitfalls of creating a colocated repo on Windows due to the missing support for .gitattributes. While the docs explain how to recover the situation, they can lead to potential data loss if the user has untracked (but not gitignored) files in the working copy of the git repo. The docs suggest using jj abandon after setting git's core.autocrlf to input. However this would result in "losing" all those untracked files. They can still be recovered by using jj undo, but the docs do not mention that (and after using jj undo the user would be back on square one).

Until .gitattributes support is added, I'd suggest improving the documentation. I think it should suggest changing git's core.autocrlf to input before creating the colocated jujutsu repo. It should also explain what to do in in case the user has any untracked but not gitignored files laying around when creating a the colocated repo. Probably the docs should mention jj config set --user snapshot.auto-track "none()" and remind users that jj undo exists just in case something still goes wrong.

Personally, I think this issue is a good example and a good argument in favor of changing the default snapshot.auto-track from all() to none() as suggested by #323.

Specifications

  • Platform: Windows
  • Version: 0.24.0
@PhilipMetzger PhilipMetzger added the documentation Improvements or additions to documentation label Dec 30, 2024
@PhilipMetzger
Copy link
Contributor

PhilipMetzger commented Dec 30, 2024

I think improving the documentation should be no problem.

Probably the docs should mention jj config set --user snapshot.auto-track "none()" and remind users that jj undo exists just in case something still goes wrong.

Personally, I think this issue is a good example and a good argument in favor of changing the default snapshot.auto-track from all() to none() as suggested by #323.

This part I personally disagree with though, as auto-tracking is a good feature. Something actionable would be to print "Set snapshot.auto-track = none to preserve Git-like behavior." after co-locating, leaving the choice to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation 🪟Windows
Projects
None yet
Development

No branches or pull requests

3 participants