Git Setup Flashcards

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

Install git

A
sudo apt-get (linux/mac)
Or
sudo yum (c9)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Configure user name with git

A

git config –global user.name “Your Name”

With quotation marks

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

Configure email with git

A

git config –global user.email “yourname@example.com”

With the quotation marks

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

Configure default branch name

A

git config –global init.defaultBranch main

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

Enable colourful output with git

A

git config –global color.ui auto

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

Check username or email with git

A

git config –get user.name

git config –get user.email

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

Create a SSH key so you don’t have to put your password in everytime you upload

A

https://www.theodinproject.com/paths/foundations/courses/foundations/lessons/setting-up-git
ssh-keygen -C
Navigate to where the key is (ls ~/.ssh/id_rsa.pub). Open it. Copy the contents to github/settings/SSH Keys
In terminal: ssh -T git@github.com

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

(git)
Make it so you don’t have to renter a password for a set amount of time

or default to 15 min

A

git config –global credential.helper ‘cache –timeout=172800 ‘
3600 seconds = 1 hour
172800 = 2 days

git config –global credential.helper cache
defaults to 15 min

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

Generate a key

A

ssh-keygen -t ed25519 -C “your_email@example.com”
Legacy:
ssh-keygen -t rsa -b 4096 -C “your_email@example.com”

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