managing versions Flashcards

revision control

1
Q

what is version management?

A

keeping track of older versions of your code, i.e. if you make a mistake you can recover an older version, or, if you work with other people, you can merge your changes without a lot of headaches.

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

what’s are some examples of revision management software?

A

git*, bizar, mercurial

*just use this!

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

how do you use revision management software?

A

After writing some code (i.e. a small amount):

1) create a repository if you haven’t already, e.g. : git init .
2) check-in your the code you just wrote, with a description of what you did, e.g. git add .; git commit -m “Added a new function to contact morpheus”
3) push* your changes to a remote repository (that you share with your team), e.g. git push origin

*Note: you may need to get any changes other people made before you push: git fetch; git pull –rebase

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

where can you setup a remote git repository (so you can share your work between computers or with other coders)?

A

github.com, bitbucket.com, ask dr. Goo-gle for more

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

what’s an ssh-key?

A

you can generate a unique key-pair (i.e. public & private keys) so that whenever your current computer connects to a remote git-repository that system will know it’s you (and not somebody else).

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

when do you share the private key?

A

never

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

which of the ssh-key files do you share?

A

the public one, i.e. it ends with .pub, e.g. “id_rsa.pub” (not “id_rsa” which is the private key)

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