1

In popular products like GitLab, you can use a CI/CD pipeline to set passwords and other sensitive information during deployment.

Is it possible for me to also do this when a developer clones the repository or checks out a specific branch?

Let's suppose I have the following remote file in Master, Production, Test and Development branches of Git:

config.txt
BufferSize=4096
Password=%passwordGoesHere%
BackgroundColor=Blue

When a developer clones the repository, I want the config.txt file of all accessible branches to be updated with the appropriate password.

I think VonC mentions filter drivers at [A] and [B], but I'm unsure how to create a filter driver. Also, from my limited understanding, a filter driver may not work on a per branch basis anyway per torek [C]

[A] - Can git automatically switch between spaces and tabs?
[B] - web.config and app.config machine-specific settings in git
[C] - git how to keep a config file different in different branches?

NOTE: I apologize if the SO community feels this question might be a duplicate

Shawn Eary
  • 684
  • 2
  • 7
  • 21
  • 1
    Branches are now possible with content filter driver, since Git 2.27: https://stackoverflow.com/a/60905975/6309 – VonC Sep 29 '20 at 20:46

0 Answers0