Remote Branching Flashcards

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

How to know the name of the remote server

A

git remote show

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

How to get the list of remote branches

A

git remote show remote
eg remote show origin
or
git remote ls-remote

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

How to create a remote branch from the local branch

A

git checkout -b new-branch

git push -u remote branch-name

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

how to create a remote branch as a local branch

A

git checkout -b branch-name remote/branch-name
or
git checkout –track remote/branch name

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

How to track which local branch is set up to track remote branches

A

git branch -vv

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

what is ahead and behind

A

ahead - have two commits locally that are not pushed to the server
behind - commit on the server we haven’t merged in yet

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