There is a project with source codes (in python), which I regularly post on Github. It contains variables (so far one, is a token: TOKEN="..." ), which I do not want to spread for universal access. However, in my debugging and verification process, I fill these variables with the appropriate values.
Before that, I simply manually deleted the value before the commit, then, during the startup process and other things, I inserted the value again. But now I'm wondering, is it possible in Git to reset a certain variable before committing and pushing?
So far, I see 2 exits without using Git features:
- or have an exported configuration file that can not be used in a common repository; but for the time being, for the sake of one variable, I consider this to be a redundant solution;
- or just write a one-liner with
sed`th, which is not so interesting, unlike learning about the possibilities of Git. Yes, and it is a crutch, in my opinion.
BUILD.CONFIGit was suggested to solve it and in thegradlesomethinggradlethere, like ... And the constant in the code took just the value from the build ... - Yuriy SPb ♦