Better Programming

Advice for programmers.

Member-only story

How To Put a Legacy Application in Git

To verify all applications are in a version control system

Benjamin Rancourt
Better Programming
Published in
4 min readJun 24, 2022

--

Have you ever encountered an old application that, in 2022, is still not under a version control system (VCS) like Git or Apache Subversion? A system that, in order to modify it, you need to connect to the server where the application is located and directly modify the files with vim?

At Ville de Sherbrooke, one of our main systems was. Someone could have easily introduced new changes or flaws. The only person who made the change would know why it was made!

It was time to start tracking the changes in that system.

Structuring

Since a legacy system could be very complex, we need to structure ourselves to determine what and how we want to version it.

Git branches

Our system has two environments: production and development. As they could each have a different version of the application, they will need to have their corresponding branch in Git: main and develop.

While you’re thinking about Git, you can probably go to GitLab or GitHub to create a new Git repository. Make sure it’s empty because it’ll be a lot easier.

Development files

--

--

Benjamin Rancourt
Benjamin Rancourt

Written by Benjamin Rancourt

Are you looking to read for more technical posts? 🤖 Follow me! I publish articles about Docker 🐳, JavaScript 🐝, GitLab 🦊, Java ☕, etc. once a week.

No responses yet