Lesson 6: Source Control: Guarding Your Code like Gondor
[CFL2M] Top CF Source Control Solutions
*Note: You're reading a lesson from our ColdFusion Legacy 2 Modernization E-Course [CFL2M]. Interested in getting the full course? Click here to sign up.
If you edit CF code then you need a source control system. If you have a team of CFers or Orcs are attacking your code, then doubly so!
Without a source control system, you run the risk of
- Changes getting overwritten or lost
- Not knowing how to undo changes
- Not being able to track which changes are part of a particular release
[Also, quick shout out to those of you who did the action step from the last lesson and got Docker to work its magic. Nice job!]
When you can’t track what’s happening, you can’t tell which developer in a team made which change or why, and it’s much harder to track down bugs.
If you aim to be as wise as Gandalf, having source control is your best bet.
With source control you can:
- Track who changed what lines of code when
- Rollback bad changes
- Merge different CFers’ changes together intelligently
- See a complete history of all changes
Plus, you have your code backed up securely.
TeraTech’s Recommendations:
- Git is the most popular version control system. You can use it for free on pretty much any platform. Git is a solid option if you have an open-source project or don't care that the public can see your source code.
- GitHub is a paid flavor of Git that has lots of extra features such as CI pipelines and can keep your company’s source code private. It is free for smaller projects or paid beyond that.
- Bitbucket is a popular commercial flavor of Git that TeraTech uses. Loads of extra features such as AI, CI/CD and Jira integration if you use that ticking system. It is free for five or fewer developers and is paid beyond that.
Here is CF Alive podcast episode 052 to help you “git” started with Git:
Aragorn Action Step: Download a Git flavor and play with using it. If you get stuck, listen to the above podcast.
This takes a bit more work up front, but one day you’re going to be VERY glad you did it. Invest a few hours now and it’ll save you many hours (and headaches) in the future.
Already have source control installed? Congrats! I’m curious to hear how you track changes.
Please hit “reply” and let me know if you use Git, Bitbucket, or another option!
Next lesson: How to establish a robust environment management strategy.
Michaela Light, CEO TeraTech
PS You’re almost halfway done, keep up the good work!