1. Register with Github on their web site. Define a repository: e.g. jmivory/DEM (this will create a repository with name DEM, with a branch named master),
2. Install Visual LANSA as an Independent Workstation to a VCS Master.
3. Open LANSA options from the File menu -> Options. Configure version control as follows:
Note that Product Git has been selected.
Consider how you want to deal with new objects and deleting objects. For example, you may not want all new objects to be added to version control automatically. Note that an object can always be removed from version control.
Also, as a developer you may not want all components compiled when they are "pulled" to your PC because for a large application this could take some time. On the other hand, it’s a useful feature on a build machine.
4. Restart Visual LANSA.
5. Open Version Control from the Tabs dropdown on the Home ribbon. The Version Control folder contains sub-folders for the Active Partition and System Information. Note that toolbar buttons are available for Commit, Pull, Push and Branch.
Right-click Version Control and use the context menu to Create Git Repository.
Select Clone repository.
Enter the URL for your Github repository. For example:
https://github.com/jmivory/DEM
6. The icon for Version Control changes to indicate Visual LANSA recognises that the folder contains a Git repository.
7. Your next steps will depend on how you want to implement version control. For example, a typical approach would be to create new branches using Git Extensions (or similar) and use the branches as follows:
• Master (Production)
• Develop (Development)
• FBnnnnn (Feature Branch)
• HF.n.n.n.n (Hot Fix Branch)
• RB. n.n.n (Release Branch)
The Git Extensions graphical interface tool for Git is installed with Visual LANSA. Other tools are also available, for example Github has a GUI tool, available in Github Desktop.
Visual LANSA supports the following Git functionality:
• Create a Git repository / Clone repository
• Add to version control
• Remove from version control
• Commit
• Pull from remote repository
• Push to remote repository
• Change branch
• Conflict resolution using KDiff3 as the merge tool
All objects in the LANSA Repository have a Version Control Status and Git Status.