Remote Repositories Flashcards

1
Q

What is a connection string in git in regards to remote repositories?

A

A connection string is a URL that we can use to let Git know where the remote repository is located.

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

Commonly used platforms for maintaining remote repositeries?

A

Gitlab
BitBucket
Github

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

How to add your remote repository to your local repository?

A

Using the “git remote add origin https://xxxx.com”, origin is like a name for the remote repo

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

command to list all your remote repositories

A

git remote -v
You can have more than one remote repo

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

command to push a branch to remote repository

A

git push origin master
origin - is the pointer to the url of your remote repository
master - is the name of the branch you want to push to remote repo

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

Command to clone a repository

A

git clone [ssh link]

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

What is a pull request or PR?

A

It is when say you have pushed your changes to a branch called sarah, and the master branch is one commit behind Sarah, then you can open a pull request or PR, to merge the changes into the master branch

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

How to update your local master branch with the changes that have been pushed to the remote master branch?

A

git fetch origin master –> First we fetch all the changes from our remote repo
git merge origin/master – > Now we merge the origin master branch into the local master branch

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

Command to view all the branches both remote and local?

A

git branch -a

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