Version Control Flashcards
Types of Version Control Systems
- Local
- Centralized
- Distributed
- Local database keeps track of file versions
- e.g. RCS (Revision Control System)
Local VCS
VC systems either keep:
* actual copies of file versions; or
* ________, which are the set of additions / subtractions to a file.
patch sets
- A single server contains the file versions
- Clients check out individual files/folders from the central server
- Collaboration with others is possible
- Easy to administer file permissions
- Single point of failure
Centralized VC
Examples of Centralized VC
(According to the slides)
- CVS (Concurrent Versions System)
- Subversion
- Perforce
- Machines fully mirror the repository, including the history of changes
- Peer-to-peer approach
- Each peer is a valid repository
- No single point of failure
- Large repositories may be impractical to mirror (either due to large files, or very long histories)
Distributed VCS
Examples of Distributed VCS
(According to the slides)
- Git
- Mercurial
- Bazaar
- Darcs
Advantages of VCS
- Backup & Restore - Save all your changes and jump to any version at any time.
- Short-term / Long-term undo - No fear of experimental changes, whether short or long term.
- Synchronization - Stay up to date with teammates’ work.
- Track Changes - Track the development of each file, and explain why the changes happened.
- Track Ownership - Find out who made a particular change.
- Branching/Merging - Make a copy of your code that you can modify in isolation. You can delete, or merge this copy back to the ‘main’ version.
VCS Terminology
- Where the files are stored
- Repositories can be remote or local
- Local repos are also called the working copy
Repository
VCS Terminology
(n.) a copy of another repository (all the files, and revision history)
Clone
VCS Terminology
- (v.) To record the changes in the VC history/log
- (n.) a version or ‘checkpoint’ that you can go back to any time
Commit
VCS Terminology
The latest commit in the repository
Head
VCS Terminology
- A copy of the code base
- Each branch can evolve separately from otherbranches
- The stable code is usually found in a main branch (in Git this is called master)
Branch
- Different branches can be merged together
- e.g.
Branch A has commits 1 & 2
Branch B has commits 1, 2, & 3
B can be merged into A so that A will have the 3rd commit as well
- e.g.
Merge
- When there are two or more conflicting changes to the same file
- ________ must be resolved
Conflict/s
To get all the latest changes from the remote repo and put them in your local repo
Update/Sync
True or False
Git =/= GitHub
True
They are independent of each other.
- A distributed version control system
- Free and open-source software
- Primarily a command line tool
- Has 3rd party GUI and add-ons for IDEs
Git
- A website/service designed to function with Git(but not other VCS)
- Main function: Allows users to create git repositories on their server
- Alternative: GitLabs, BitBucket
GitHub