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 a .gitignore in migration folder for sea-orm-cli migrate init #1331

Closed
sanihaq opened this issue Dec 23, 2022 · 1 comment · Fixed by #1334
Closed

Add a .gitignore in migration folder for sea-orm-cli migrate init #1331

sanihaq opened this issue Dec 23, 2022 · 1 comment · Fixed by #1334
Assignees

Comments

@sanihaq
Copy link
Contributor

sanihaq commented Dec 23, 2022

Please add a .gitignore with the default rust ignore pattern.
I've twice committed the target folder already

@billy1624
Copy link
Member

Hey @sanihaq, thanks for the suggestion!! I think it would be better if we able to mimic similar behaviour of cargo init command.

If you are not in an existing git repo, cargo init does start a git repo and adds a .gitignore. If you are already in a git repo maybe change the root .gitignore to include something like */target/*

rust-lang/cargo#9633 (comment)

We can check if the migration folder resides in a Git VCS or not with this: https://docs.rs/git-discover/latest/git_discover/fn.upwards.html

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

Successfully merging a pull request may close this issue.

2 participants