Version Control Flashcards
What is version control?
Version control is a system that records all changes and modifications to files for tracking purposes. It allows developers to revert or roll back to a previous state or point in time.`
What are other terms used to refer to version control?
Developers also use the terms “source control” or “source code management.”
What is the primary goal of a version control system?
The primary goal of any version control system is to keep track of changes and allow developers to access the entire change history.
What types of changes can be tracked by a version control system?
Adding new files, modifying or updating files, and deleting files.
How does version control help with identity tracking?
Version control records the identity of the user responsible for adding or changing a record, providing accountability for changes.
What are some benefits of version control for developers?
Revision history, identity tracking, collaboration, automation, and efficiency.
What is revision history in version control?
Revision history is a record of all changes in a project, allowing developers to revert to a stable point in time if issues arise.
How does version control provide a safety net in word processing applications?
Word processing applications use auto-saving to create restoration points, allowing users to revert to a previous version of the document if needed.
What is a peer review in the context of version control?
A process where developers on a team review each other’s code and provide feedback before the code is finalized.
How does version control aid in DevOps?
Version control plays an integral role in DevOps by tracking changes and aiding in the quality release and deployment of software.
What is an iteration in the agile methodology?
In the agile methodology, an iteration is a two-week period in which a team plans and completes a list of tasks.
How does version control contribute to efficiency in development teams?
Version control allows teams to submit code, track changes, and ensure that new features won’t break existing functionality, which aids in team efficiency.
What is the role of automation in version control systems?
Automation helps ensure that every new task or feature introduced does not break existing flows, increasing team efficiency and confidence.
How is Meta’s approach to project management different from other companies?
At Meta, engineers are in charge of projects, while at other companies, product managers or leadership are often in charge of each project.
What is unique about version control at Meta?
Meta has a giant monolithic repository for all back-end code, shared by every Instagram team, where any engineer can make improvements.
What is Meta’s stance on responsibility for code?
Meta has a saying that “nothing at Meta is someone else’s problem,” meaning any engineer can work on anything they want to.
How does version control at Meta differ from other companies?
Meta uses a monolithic repository, while many companies use smaller repositories (micro-services) for each team.
Why doesn’t Meta use branches for each team?
With so many engineers, using branches would cause too many merge conflicts.
What is a challenge of using a monolithic repository at Meta?
Merge conflicts happen often, so they try to write smaller changes and add gatekeepers to easily revert changes if necessary.
Why is collaboration critical for success at Meta?
Effective collaboration helps in building better products by getting diverse perspectives on what features to build and how to improve them.
How does Meta ensure that Instagram and Messenger calling don’t interfere with each other?
They add a lot of tests to make sure Messenger doesn’t break Instagram and vice versa.
What is git blame and why is it useful?
GIT BLAME is a tool that allows you to see who wrote a specific line of code. It helps to understand the context of the code and identify who to contact for more information.
How does version control help at Meta?
It helps with tracking changes, reverting code if necessary, and allowing engineers to collaborate by making improvements across the codebase.
What problem does version control help solve when multiple developers are working in the same codebase?
Version control helps keep track of updates and changes from multiple developers working on the same codebase, preventing issues like overwriting each other’s work.
What are the two main types of version control systems?
Centralized Version Control Systems (CVCS) and Distributed Version Control Systems (DVCS).
What is a centralized version control system (CVCS)?
In CVCS, there is a central server that holds the full history of changes. Developers pull code from this server and must push their changes back to it for others to see.
In a centralized version control system, where is the full history of the code stored?
The full history of the code is stored on a central server.
What is an advantage of a centralized version control system (CVCS)?
CVCS is generally easier to learn than distributed systems and provides more control over user access.
Name some examples of version control systems.
Examples include Subversion, Perforce, AWS Code Commit, Mercurial, and Git.
What is a key advantage of a distributed version control system (DVCS)?
In DVCS, you don’t need to be connected to the server to add changes or view a file’s history, allowing offline work and better speed and performance.
What is the key difference between centralized and distributed version control systems?
In a centralized system, only the server holds the full history, and users are clients. In a distributed system, every user has a full copy of the codebase and history, making each user essentially a server.