Git Flashcards

1
Q

What does Git fetch do?

A

Fetched branches and/or tags (collectively, “refs”) from one or more other repositories, along with the objects necessary to complete their histories. Remote-tracking branches are updated.

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

What does Git pull do?

A

Incorporates changes from a remote repository into the current branch. If the current branch is behind the remote, then by default it will fast-forward the current branch to match the remote. If the current branch and the remote have diverged, the user needs to specify how to reconcile the divergent branches with –rebase or –no-rebase (or the corresponding configuration option in pull.rebase).

More precisely, git pull runs git fetch with the given parameters and then depending on configuration options or command line flags, will call either git rebase or git merge to reconcile diverging branches.

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

What are git tags?

A

Tags are ref’s that point to specific points in Git history.

A lightweight tag is very much like a branch that doesn’t change — it’s just a pointer to a specific commit.

Annotated tags, however, are stored as full objects in the Git database. They store extra meta data such as: the tagger name, email, and date.

Example of a tag: v1.0.1

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

What are git refs?

A

A Git reference (git ref) is a file that contains a Git commit SHA-1 hash.

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

What are releases

A

Releases are GitHub’s way of packaging and providing software to your users. You can think of it as a replacement to using downloads to provide software.

With Releases, you can provide links to binary files, as well as release notes describing your changes.

At their core, Releases are based on Git tags. Tags mark a specific point in the history of your project, so they’re a great way to indicate a Release. Releases are ordered by a tag’s date in the following way:

If it’s an annotated tag, the tag object’s date is used.
If it’s a lightweight tag, then the commit object’s date is used.

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