Benron Git Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

See how your develop branch has diverged from your feature/my-feature branch, i.e. what’s in it that’s not reachable by your feature branch

A

git log feature/my-feature..develop

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

See what you’re about to push to remote

A

git log origin/master..HEAD

you can leave off head, too. it’ll be assumed

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

See what is in your feature/my-feature branch that has not yet been merged into your develop branch

A

git log develop..feature/my-feature

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

How do you stash both tracked files AND untracked files?

A

git stash -u

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

How do you perform a merge and ignore all whitespace changes?

A

git merge -Xignore-space-change

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

Show last 3 commits in a concise one line style

A

git log -3 –oneline

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

Interactive rebase the last 3 commits

A

git rebase -i HEAD~3

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

Show all global git settings

A

git config -l

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

Git status, concisely.

A

git status -s

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

Update your feature branch with remote develop branch

A

git co myfeature
git fetch
git rebase origin/develop

Or even easier:
git pull origin/develop –rebase

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

What does HEAD refer to?

A

The last commit of the current branch

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

Explain the syntax name1..name2

A

refers to all the commits reachable from name2 back to, but not including, name1

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

Explain the syntax name1…name2

A

refers to all the commits referenced by name1 or name2, but NOT by both.

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

Refer to all commits since a certain date

A

–since=”2 weeks ago”

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

Refer to all commits up to a certain date

A

–until=”1 week ago”

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

List all remote branches

A

git branch -l -r