Contribute to an existing repository Flashcards

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

Download a repository on GitHub to our machine.

Replace owner/repo with the owner and name of the repository to clone.

A

git clone https://github.com/owner/repo.git

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

Change into the repo directory.

A

cd repo

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

Create a new branch to store any new changes.

A

git branch my-branch

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

Switch to that branch (line of development)

A

git checkout my-branch

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

Make changes, for example, edit file1.md and file2.md using the text editor and
stage the changed files

A

git add file1.md file2.md

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

Take a snapshot of the staging area (anything that’s been added)

A

git commit -m “my snapshot”

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

Push changes to gitHub

A

git push –set-upstream origin my-branch

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