managing versions Flashcards
revision control
what is version management?
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.
what’s are some examples of revision management software?
git*, bizar, mercurial
*just use this!
how do you use revision management software?
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
where can you setup a remote git repository (so you can share your work between computers or with other coders)?
github.com, bitbucket.com, ask dr. Goo-gle for more
what’s an ssh-key?
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).
when do you share the private key?
never
which of the ssh-key files do you share?
the public one, i.e. it ends with .pub, e.g. “id_rsa.pub” (not “id_rsa” which is the private key)