Implementation - Source Control Systems Flashcards

Source Control Systems

1
Q

What is the git work flow?

A

Clone/initialize a repo (git clone/git init)

Edit/add files to the project

Add the changed files to the staging area (git add)

Commit the changes to the repository (git commit, then git push to push it to GitHub Etc.)

Go back to step 2 and repeat.

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

What is branching?

A

Its common practice to create a new branch whenever you start work on a new feature (or user story), then merge back into the main/master branch when you’re finished

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

What is the GitHub branched based workflow?

A

Create a new branch so any new ideas don’t affect the main/master branch. (If it isn’t deployable, it shouldn’t be in main)

Make some commits to this new branch as this featured is worked on

Make a pull request to the main branch when the feature is finished. This initiates a discussion with the rest of your team about your commits.

Discuss and review your code is your change missing unit tests? Coding style? Does it match project guidelines?

Merge into main! Once your pull request has been reviewed and the branch passes your tests, you can deploy your changes to verify them in production. Often teams have a specially provisioned test environment that I s deployed to first.

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

What is merging?

A

Git will then merge the changes automatically (most of the time)

Sometimes a merge conflict occurs (e.g. when two developers have changed the same file)

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

What is a .gitignore file for?

A

A .gitignore specifies files that git should ignore

These should include files you don’t need/want in your repo, including:

Dependency caches (nodes modules is a notorious example)

Complied code

Files generated at runtime

Personal IDE config files (like .idea/workspace.xml)

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

What are the useful features of version control?

A

if a feature is added that breaks all the code

You can rollback to a previous version that compiles and passes all tests.

Then try again with the new feature.

Each committed revision gives you a rollback position

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

What are some good tips for source control management?

A

If it’s not in source control, it doesn’t exist

Commit early, commit often

Always inspect your changes before committing

Consider your teammates when writing commit messages

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

Should we version our database (or files)?

A

Many applications will not run without their database.

If you’re not versioning the database, what you end up with is an incomplete picture of the application, which in practice is rendered entirely useless.

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