Maven & Git Flashcards

1
Q

What is Maven?

A

It is a project management and build automation tool. Helps in building and documenting a project. It is based on the POM (project object model).

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

What is the default maven build lifecycle?

A

The default lifecycle handles project deployment and testing. This is the point where .JAR files are created.

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

Where from/ when does Maven retrieve dependencies ? Where are they stored locally?

A

They are retrieved from the Maven repository when the program is ran. They are stored on the hidden M2 directory that is within your home directory. (~/.m2 – This is where your dependencies are stored locally).

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

What is the POM and what is the pom.xml?

A

The POM is the project object model. The pom.xml contains all the information regarding the project and configuration details. When we tend to a task, Maven searches for the POM in the current directory. Also includes the plugins used by Maven in the project.
It makes sure that a project has the right JAR files.
Maven updates the dependences according to the POM.

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

What defines Maven project coordinates?

A

A group identifier, an artifact identifier, and the version.

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

What is version control?

A

Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later.

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

What is the difference between git and GitHub?

A

GitHub is the website that hosts repositories and git is the version control system.

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

List the git commands you know and what they do

A

git clone (allows you to clone a git repository from github onto your local device), git add (adds your branch to the staging area), git commit -m”” (commits the staging environment to the repository), git push (adds your branch to the GitHub website). Git checkout allows you to move between different branches. Git checkout -b allows you to create a new branch.

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

How would you prevent a file from being tracked by git?

A

You would put that file ino the .gitignore file.

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

What is a branch? What are some common branching strategies?

A

A branch is a different version of a repository created by a contributor. The main branching strategy is to have the default branch reflect the program’s production state and a second branch to represent development. All other branches are generally small changes made to the development state which may eventually merge with the production state.

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

What is a merge conflict? How do you prevent it? How do you resolve it?

A

Conflicts generally arise when two people have changed the same lines in a file, or if one developer deleted a file while another developer was modifying. You prevent it with communication. You resolve it by editing the conflicted file.

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

What is a GitHub pull request?

A

A pull request is letting other developers know about the changes you’re about to merge of the branch you’re in and it allows you to review that code or merge conflicts if necessary.

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

What is the git workflow for editing code and saving changes?

A

Clone the repository or pull if you can, go into the repository, make changes, add it, commit it, push it.

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

What is a commit?

A

A commit is a snapshot of your repository at a certain time. The commit process occurs right before the ‘push’ process, when the repository officially gets added to the cloud.

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

How would you go back in your commit history if you make a mistake?

A

You would get the commit ID of the previous version of the repository by using $ git checkout and then “pushing” that previous version to the cloud.

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

What is a GitHub issue?

A

Issueslet you track your work on GitHub, where development happens. When you mention an issue in another issue or pull request, the issue’s timeline reflects the cross-reference so that you can keep track of related work. To indicate that work is in progress, you can link an issue to a pull request.