Version Control Flashcards

1
Q

How does branching work

A

It’s like having two separate repositories, each branch has its own history and tracks its changes independently. It’s a little more complex.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is it better to use branching over trunks

A

When using trunks, at time of release, some members may be fixing last bugs and evaluation quality
At this time we don’t want to worry about changes affecting future releases, so we could freeze other development but this would be a waste of resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a trunk

A

The base of a project on which development progresses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Give two advantages of revision tags

A

Provides text for particularly important revisions

More informative than version numbers

Enables you to look back and know what the different versions were used for since the revision tags will explain this

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a revision tag

A

A textual label that can be associated with a specific revision of a project maintained by a version control system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are versions kept track of

A

Every time you update your own repository the number increments. (File Specific: version 1.3 of MyProgram.java => 3 changes)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Name differences between centralise repositories and distributed repositories

A

CENTRALISED REPOSITORY:
Only has two operations - update and commit
Commit to centralised repository - others can see changes immediately

DISTRIBUTED REPOSITORY:
Every developer has a local repository and commits to their own working copy
Changes must be pushed to the central repository
Others have to pull your changes to their own repository - this updates their own working copy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

THEORY CARD VERSION CONTROL

A project-wide “undo button”

Code won’t be lost through overwrites - when there are multiple developers working on the same code

Keeps a record of changes - find out who made what changes

Supports multiple releases at the same time - no need to freeze development leading up to a release

Able to support customers if they have problems with previous versions of the software - able to intercept the version of the software at a given date/time

A

Repository acts as a server - provides a safe and secure place for files to be kept

Can work on the project using local machines - edit the project using client version control tools

Can allow local offline changes - resynchronise code later

Simple way to manage program files - some allow multiple repositories other allow for a single central master repository

Allows for atomic commits (small changes)

Provides documentation - easier to find which methods were created in which version of the software

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does version control do

A

It records changes over time

Access versions of the same software later

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How are files that need to have locks dealt with (e.g. binary files)

A

The VCS will mark binary files as non-mergeable

With other files that require locks we can manually set a locks on them

When committing a file or directory, all locks that are being held are release

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

In optimistic locking, what would cause a commit to fail?

A

If you to commit to a file that has been changed, and you didn’t update your own file before making changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is strict locking

What is optimistic locking

A

1) Only one person can change a file at any one time
2) Prevents you from overwriting changes that were made by others. Therefore local copies of the project must be updated before you can commit any changes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is merging

A

When changes made in branches are combined and made to the main trunk

Bugs fixed in a release can be used to fix the trunk source

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is forking

A

A copy of a repository with all its code, branches and history on the server.

Often used if there is a split of opinion in the development team

How well did you know this?
1
Not at all
2
3
4
5
Perfectly