video Git and GitHub for beginners Flashcards

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

clone

A

bring a repository that is hosted somewhere like GitHub into a folder on your local machine

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

track your files and changes in Git: command

A

add

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

push

A

upload Git commits to a remote repo, like Github

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

pull

A

download changes from remote repo to your local machine

the opposite of the push

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

how to clone a Github repository on your computer?

A

open Git Bash

open repository on GitHub

settings - deploy keys - create new

in Bash: ssh-keygen -t rsa -b 4096 -C “my@email”

open ssh agent in Bash: eval $(ssh-agent -s)

add the key to that agent: ssh-add ~/.ssh/name_key (default is id_rsa or whatever it writes earlier during the creation)

to copy the key: clip < ~/.ssh/name_key.pub

back at GitHub: paste into the key field, give it some name, allow writing, create. Now the repo has a key.

code - code dropdown - choose SSH, copy the address

in Bash: back to the home directory: cd

git clone paste_the_address

if it asks - say “yes”

cd name_of_the_repo

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

how to commit changes on your computer?

A

make changes, then:

to check, if the changes occurred: git status

to add to commit: git add .

to commit: git commit -m “name of the commit”

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

push commits to GitHub from a project that was originally cloned from GitHub to your machine

A

to push: git push

at GitHub: new commit should appear in the “code” tab of the repo

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