git Flashcards

1
Q

set an Angular-CLI project to use yarn

A

ng set –global packageManager=yarn

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

push a vanilla local repo to GitHub

A

git remote add origin https://github.com/blaster151/{{name}}.git

git push -u origin master (-u is short for –set-upstream)

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

can use hub (the advanced command line for GitHub) to fork a repo

A

needs SSH cert and not https mode, though

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

can run the GitHub API directly from the command line with curl statements

A

interesting

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

to fork your own GitHub repo . . .

A

1) new repo on GH; 2) clone locally; 3) add an upstream remote: git remote add upstream {originalGitFile}; 4) git pull upstream master 5) push: git push origin master

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

to update your fork from the original

A

git fetch upstream

git merge upstream/master

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

after forking, you have two remotes

A

origin (form) and upstream (original)

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

lists the most recently worked on branches from top to bottom

A

git for-each-ref –sort=-committerdate refs/heads/

optional “–count 3”
optional “–format ‘%(refname)’”
optional “–merged __” or “–no-merged __” shows which ones have or have not been merged FROM the specified branch

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