aws-samples / image-optimization

Simple, performant and cost efficient solution for optimizing images using Amazon CloudFront, Amazon S3 and AWS Lambda
MIT No Attribution
172 stars 106 forks source link

Allow url-rewrite/index.js in .gitignore #41

Closed maiconcarraro closed 2 months ago

maiconcarraro commented 2 months ago

Issue #, if available: None

Description of changes: The existing .gitignore won't allow to push changes for .js file if you do a new git init.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

piotrekwitkowski commented 2 months ago

Hi, this is not exactly correct. Fixes and changes to the file functions/url-rewrite/index.js will be pushed - the .js is indeed in the .gitignore, but the file itself is tracked. You can check with git status:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   functions/url-rewrite/index.js

Was this a problem for you when trying to update the file, or fix something? Could you share more details?

I can't see how this is improving the project at the moment. We can update the ignore file if we need to add more files in the future, but all necessary files are tracked at the moment how they are supposed to be.

maiconcarraro commented 2 months ago

Was this a problem for you when trying to update the file, or fix something? Could you share more details?

It is a problem when you do a new git init, I cloned and did changes for my personal project, but after doing the git init and remote to push, it was missing this file, but I understand thats not really a value for this specific repo, it only affects who is going to use this as a reference.

piotrekwitkowski commented 2 months ago

I see your point and value here, could you then just update the gitignore instead of changing the file extension? I think that's a bit more elegant way to approach it. Thanks!

maiconcarraro commented 2 months ago

I see your point and value here, could you then just update the gitignore instead of changing the file extension? I think that's a bit more elegant way to approach it. Thanks!

Appreciate, did a force push to keep history clean with your request.