In the main branch there is now a logs folder with an app.log file containing information about users that has logged in. This sounds like a security issue? Should this really be there or can we make git forget about this file and also update .gitignore so the file isn't included again?
Are there any other files that can be removed in the same way?
Something like this should work
Add the file to .gitignore
echo "path/to/your/file" >> .gitignore
Remove the file from Git tracking
git rm --cached path/to/your/file
Commit the changes
git commit -m "Remove file from Git tracking and add to .gitignore"
Push the changes to the remote repository
git push
Also make sure that PRs that are active now also gets updated with this information and stops tracking the files?
Should be solved by merging or rebasing them with main?
git fetch origin
git merge origin/main
git fetch origin
git rebase origin/main
In the main branch there is now a logs folder with an app.log file containing information about users that has logged in. This sounds like a security issue? Should this really be there or can we make git forget about this file and also update .gitignore so the file isn't included again?
Are there any other files that can be removed in the same way?
Something like this should work
Add the file to .gitignore
echo "path/to/your/file" >> .gitignore
Remove the file from Git tracking
git rm --cached path/to/your/file
Commit the changes
git commit -m "Remove file from Git tracking and add to .gitignore"
Push the changes to the remote repository
git push
Also make sure that PRs that are active now also gets updated with this information and stops tracking the files?
Should be solved by merging or rebasing them with main?
git fetch origin
git merge origin/main
git fetch origin
git rebase origin/main