Version Control Flashcards

1
Q

What are the benefits of version control?

A

Collaboration -> organised and smooth task collaboration among team members

Storing versions -> stores file versions after making changes

Restoring previous versions -> ability to revert to previous versions if needed

Understanding what happened -> changes accompanied by comments explain reason for change

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

What are the 3 types of version control?

A

Local VC

Centralised VC

Distributed VC

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

What is local VC?

A

On local PC
Not good for collaboration
Error prone

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

What is centralised VC?

A

Trad. method to enable collaboration among devs on same project

Single server contains all versioned files and clients can check file from that place

Risk -> if server fails the data can be lost

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

What is distributed VC?

A

Modern VC systems where everyone gets a copy of the files on their local machine

Allows many backup copies to exist

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

What is Git?

A

Free, open-source distributed version control system

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

What are the main functions in Git?

A

Commit -> snapshot of changes

Branch -> separate version of project files, each branch has a name and a chronological chain of commits

New branch -> when created, files in the main branch are replicated. changes that are not in the main branch should be made here

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

What are the git commands?

A

git init - creates an empty git repo
git add - adds file contents to staging area
git commit - records changes to repo
git checkout - switch between files, commits or branches
git push - update remote repo with committed files
git fetch - download files from another repo
git merge - join two or more development histories together
git pull - fetch from and integrate with another repo or local branch
git branch - create, list, rename or delete a branch
git status - shows current status of branching and HEAD position

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

What is Github?

A

Remote host for git repositories

Facilitates:
- version control
- collaboration
- issue tracking

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

What is a protected main branch?

A

Projects often have a protected main branch that is
- clean error-free version of code
- in remote/shared rpo
- cannot push directly
- must request to add changes to main branch

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

What is a PR?

A

Pull request - request made when you want to add changes to the main branch

Allows quality control of code that is in the main branch

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