Version Control Flashcards
What is the purpose of VC?
To keep a logging system of program updates. This enables access to previous versions.
What are the 6 main benefits of VC?
- Reinstate previous versions
- Concurrent development on a single project
- Changes to current version don’t overwrite old versions.
- Enables atomic commits.
- Detailed log of what developments have been done and when.
- Can see who has been working on the product and what they have done, this provides accountability.
Which files are needed for version control?
Any file that enables the program to be loaded from scratch on a new system.
Are class files needed for version control?
No, because class files will be recompiled.
Define a centralised repository…
A repository in which all contributors update and commit directly to and from the main repository.
Define a decentralised repository…
A global repo in which all contributors pull current state to a local repo, and then update their working copy from the local repo. They then commit to their local repo, and can push to the global repo if desired.
In which type of repo and between which repos do the push pull commands work?
Decentralised.
Between the main and local repos.
Define Trunk
The main code base from which contributors are working.
Define Branch
Local projects that are derived from the trunk.
Define Forking
An independent copy of the repo.
Define Merge
Merging a branch back into the trunk.
Define Lock
Controls the number of contributors than can operate on a file at any given time.
What are the 2 types of lock?
Strict - Enables one select person to work on the file.
Optimistic - Enables a select number of contributors to work on the file concurrently.
When Optimistic Locking is enabled, what is the main consideration regarding fresh data?
The file being worked on must be up to date before committing. For example, if a working copy is updated from the local repo, and the contributor modifies the project and wants to commit, they must ensure that the current local repo copy is the same as when they updated their working copy.