-
Notifications
You must be signed in to change notification settings - Fork 820
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
amplifyconfiguration.dart
is being added to .gitignore
automatically
#7591
Comments
amplifyconfiguration.dart
is being added to the .gitignore
automaticallyamplifyconfiguration.dart
is being added to .gitignore
automatically
@MohammedNoureldin yes, by design the configuration file is added to the .gitignore. More info about that file is available on https://docs.amplify.aws/cli/reference/files#amplifyconfigurationjson , as well as other amplify configuration files. A few reasons for having in .gitignore by default is 1) the information in the file should not be shared publicly 2) if you use multiple amplify environments, the contents of that file might change as you switch environments, causing some strange behavior if checked in. While that's the default behavior for those reasons, you might choose to to add that file to git to support the use case of adding existing resources and recording those changes in git. If you do that, be sure it's a private git repo and be aware that some Amplify CLI actions, such as changing environments, might overwrite custom changes to that file. |
@ragingsquirrel3 thank you for your reply. Why the information inside that file should not be published? If this data will be shipped anyway with the App to the public, why to not check it into the source control? It is stated that amplifyconfiguration.dart is equivalent aws-exprots.js, which has no sensitive information (mentioned in the link you sent). So I suppose that pushing this to a public repo should not be a problem. |
@MohammedNoureldin I am going to transfer this to the amplify-cli repository, as it is the amplify-cli which adds this file to .gitignore. |
Hey @MohammedNoureldin 👋 as @ragingsquirrel3 noted this is the default behavior for the CLI as checking this file into source control can cause unexpected behavior when using multiple environments and branches as it is specific to the currently-initialized app. You can choose to opt-in to checking this file into source control, however please be aware of the pitfalls such as the CLI making changes to this file and the gitignore as actions are performed. |
Closing as the question has been answered. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Is it ok that
amplifyconfiguration.dart
is being added to the.gitignore
file automatically? I have just tried initializing my project, and this file was added to gitignore.In my case I am using already existing resources, so that requires editing this file manually (if I am doing that correctly). If this file should be really excluded, how should I add my already existing resources?
My
flutter --version
output:The text was updated successfully, but these errors were encountered: