Skip to content

Conversation

savil
Copy link
Collaborator

@savil savil commented Oct 6, 2022

Summary

With the recent use of nix-profile, the profile symlinks are showing up in git history.
This is regrettable.

This PR adds a .gitignore file to .devbox directory and ignoring the gen/, profile*
, nix-profile and shell-history symlinks.

Going forward, we should avoid editing this file. Each edit will need to be checked
in by our users. So, this PR is a breaking change, in a sense.

New features we add that generate files in .devbox should be added inside gen/
if they want to be gitignored.

New features that we do want users to check in (like a lock file) can be placed
in .devbox/ (and not .devbox/gen).

How was it tested?

in a new devbox project, with git init and initial files already committed:

  • did devbox shell to generate the gitignore and other files
  • did git status to inspect changes and found no new file changes were reported.
  • did ls -al .devbox and saw the other files (like gen/ and profile* were generated) as well as .devbox/.gitignore.

Copy link
Collaborator Author

savil commented Oct 6, 2022

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@savil savil requested review from loreto and mikeland73 October 6, 2022 05:25
Comment on lines 1 to 4
profile*
nix-profile/
shell_history
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alternatively, this could be changed to:

*
.*

and later if adding features we want checked in, then we can modify this file as:

*
.*
!<feature>

https://stackoverflow.com/a/5250314

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed IRL, and we'll move to this way.

@savil savil requested a review from LucilleH October 6, 2022 15:54
@savil savil marked this pull request as draft October 6, 2022 16:37
@savil savil force-pushed the savil/gitignore-devbox branch from bdfcedf to 8f34151 Compare October 6, 2022 18:35
@savil savil marked this pull request as ready for review October 6, 2022 18:40
Copy link
Contributor

@loreto loreto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@savil savil merged commit e965cfd into main Oct 6, 2022
@savil savil deleted the savil/gitignore-devbox branch October 6, 2022 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants