0

I have a private project with 10 commits. In each commit, I have committed my API token which I would like to change before I make the project public.

It's held in a simple variable: const token = 'Token ...' where '...' represents the API token.

Is it possible to automate going through the same file for each commit, updating the value of the variable (for now just to a placeholder value) and preserving the structure of the log, i.e. keep the commit history; the hashes can change.

Right now I can only think of two ways of doing it:

  • Just squash all the commits and make the change in a single file. Will do this if there's no way to accomplish the above.

  • Manually check out each commit and change it?

0 Answers0