Magento Version Control: A Guide Using Git and Beanstalk
What’s Version Control?
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. For the examples in this book you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer.
Every change made to the source of the file is tracked in version control, along with who made the change, why they made it, and references to problems fixed, or enhancements introduced by the change.
You may have already heard of this term before if you’re in anyway familiar with the popular version control systems Subversion, Git, and Mercurial.
So why do we need version control systems?
The Necessity of Magento Version Control
In its very basic essence, version control works like this:
- The developer makes a file
- Person A checks that file into a repository
- Later on, Person A decides to make changes to that file, so they process a checkout.
- When the changes are done, Person A commits the file to the code repository. The file is then given a new version number.
Now your old version is kept in history so if you mess something up you can always put it back.
Other Features of Version Control
Branching
Branching allows the user to create new features or versions of a product. You can work in a branch and not affect your stability.
Merging
Merging allows you to get code from one place to another. This is often used once a development branch becomes ready for release. You would at that time merge that branch into the trunk. You can also merge revisions.
Tagging
Tagging is generally used for creating a snapshot for a release. You may tag releases as 1.0, 2.0, 3.0, etc.
This is a great way to do it and is easy no matter which version control system you use.