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

Add Git hooks to automatically run project-manager switch #118

Open
sellout opened this issue Feb 23, 2025 · 0 comments
Open

Add Git hooks to automatically run project-manager switch #118

sellout opened this issue Feb 23, 2025 · 0 comments

Comments

@sellout
Copy link
Owner

sellout commented Feb 23, 2025

Generated files are easy to get out of sync and committed generated files can result in conflicts when rebasing, etc.

Consequently, it would be useful to have some Project Manager options that can create Git hooks that automatically run project-manager switch in some situations.

E.g.,

  • the post-checkout hook can ensure that the generated files are in sync when you switch branches1,
  • pre-push can check that generated files are up-to-date, and
  • regenerating the files on each step of an interactive rebase can quickly clear up conflicts after some earlier change.

These should be optional, as regenerating files can take some time, and it may not be important for a repo to, say, ensure that every commit has up-to-date files, so long as the PR itself does.

Footnotes

  1. I also have post-checkout set for my user, so that when I clone a new Project Manager-using repo, files are generated immediately.

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

1 participant