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

snapshot: Implicitly track ("git add") new files? #64

Open
drothlis opened this issue Mar 8, 2024 · 4 comments
Open

snapshot: Implicitly track ("git add") new files? #64

drothlis opened this issue Mar 8, 2024 · 4 comments

Comments

@drothlis
Copy link
Contributor

drothlis commented Mar 8, 2024

Just an idea; raising this to discuss.

Problem that it solves: When creating a new Python file or downloading a PNG reference image to your checkout, you have to stage it ("git add") before it will be visible on your snapshot branch.

@drothlis
Copy link
Contributor Author

drothlis commented Mar 8, 2024

cf. Jujutsu:

added files are implicitly tracked. That means that if you add a new file to the working copy, it will be automatically committed once you run e.g. jj st. Similarly, if you remove a file from the working copy, it will implicitly be untracked. To untrack a file while keeping it in the working copy, first make sure it's ignored and then run jj untrack <path>.

https://martinvonz.github.io/jj/v0.15.1/working-copy/

@drothlis
Copy link
Contributor Author

drothlis commented Mar 8, 2024

To avoid pushing huge files, perhaps only do this for .py and .png files? But there might be other file types, such as .csv with data that's read by your test scripts.

Or have a file-size threshold?

@wmanley
Copy link
Contributor

wmanley commented Mar 8, 2024

For this to work without too much overhead users would have to have good .gitignore files. The risk is that we end up with venvs committed willy-nilly. This may not be a big deal in practice though.

@drothlis
Copy link
Contributor Author

Perhaps cat all of these together: https://github.com/github/gitignore/tree/main/Global
Plus maybe Node.gitignore and Python.gitignore + site-packages/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants