Blocking commit in git - lock option

0

I'm in charge of deploying a versioning system here in the company. However I am in doubt between SVN and Git.

My question is if git has something that does the same thing as lock of SVN, that is, it blocks commit of some particular files for given branch .

What I would have is '3 branchs' fixed:

  • Master: where the main application is.
  • Homologation: where the customer is waiting to test and approve.
  • Test: where the "final" version of the program version is for intensive testing by teams.

Then you have the developments.

However in these 3 branchs, they have some configuration files (such as database, FTP, etc.) that should not pass to the other branch . So I would like, to avoid human errors, to block merge /% with% of these files between the branches and I would like to know if git has (or would have any others that allow).

    
asked by anonymous 21.12.2016 / 13:34

1 answer

1

Ignoring the part of your branchs structure that may be a separate discussion, what you need is something quite different from the solution you are thinking about. You need a process of Continous Integration and Continous Deploy.

Why do I say this? Firstly because it is currently crucial that your Deploys run in an automated manner, eliminating possible operational errors, secondly, you have variables that change according to the deployment environment, and are sensitive, and not anyone who can have access.

What I suggest to you is to use a tool such as Visual Studio Team Services (VSTS) to manage your projects. There, besides having a GIT repository for version control, you have the automatic build process and also the automatic Deploy.

In the Deploy process, you can configure your environments such as Dev, Homologation, production, etc., and embed those sensitive data in an encrypted way, ensuring security throughout the process.

If you'd like to learn more about VSTS, watch this playlist .

    
04.07.2017 / 23:40