I'm looking over stack overflow and cant find any solution (just lots of not very useful workarounds) to what I can only presume is a very common problem.
I want to ignore some files (token files etc.) changes but keep the general layout in the repository so that I do not have to manually generate the files, just refresh the token etc. I'm aware I can do any of the following.
run:
git update-index --assume-unchanged path/to/file
but everyone that uses the repository must run this each time they switch branch and run the code so this is not a practical solution.Make the generation of the files a pre build step from within the CI/CD pipeline But this does not solve the issue for people running the code locally. as outlined here
Write a shell script to generate the files locally in a temp location for anyone that clones the repo for the first time, but this causes difficult to maintain overhead when assets, tokens, profiles etc. constantly being added and removed from the project
Essentially what I am looking for is something that is similar to the --assume-unchanged
command in git that will be globally persistent for every user that cloned the repository without extra overhead for them. Maybe this doesn't exist but I thought Id ask because this seems like an incredibly useful feature. and even knowing its not possible would prevent people from having to dig around as much as I have.
Also if this is not possible, does anyone know why? Thanks in advance.