Knowledgebase

Why Everything Belongs in Version Control Print

  • devopsinfrastructure, devops, database, migration, hacked, guide, howto, solution
  • 0

The foundation.

WHAT TO COMMIT

Application code Configuration structure and examples Database migrations Deployment scripts Infrastructure descriptions Documentation

WHAT NOT TO COMMIT

Secrets and credentials Dependencies installed by a package manager Generated files Large binary assets, usually Real data

WHY VERSION CONTROL MATTERS

You can see what changed, when and why You can return to a working state Several people can work without overwriting each other Changes can be reviewed before taking effect

WHAT IT REPLACES

Folders named with dates Files named with "final" and "new" Uncertainty about what is deployed

WHAT TO SET UP FIRST

The ignore file, before the first commit.

WHY BEFORE

Once a secret is committed, it remains in history.

WHAT TO DO IF ONE WAS COMMITTED

Rotate it. Assume it is compromised.

Removing it from history does not help, because copies exist.

WHAT TO HOST IT ON

A hosted service, so it survives your machine failing.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot