HW 2 – Create GitHub account, create project

Moodle

Git Tutorial

  1. If you haven’t already done it, create an ssh key set in the terminal: “ssh-keygen -b 4096 -t rsa”.
    Just hit return for all the questions.
  2. Add the public key from your laptop to GitHub in the settings/SSH page.
    – From terminal “cat ~/.ssh/id_rsa.pub”.
    – In GitHub click on the little image in the upper right corner. Pick setting from menu.
    – Click “SSH and GPG Key”
    – Click “New SSH Key” button
    – Copy and paste key into box. Give it a name.(Doc)
  3. Create a GitHub account with your Kenyon Address. (If you haven’t already).
  4. Create a new project. Click on the checkbox to add a README.md file. Add some text to the README.md.
  5. Add me to your project as a colaborator:
    – Go into settings (in the project, at top center of the project window)
    – Click on collaborators
    – Add “jimskon” as a collaborator.
  6. Create a directory on your computer “~/rubydev”. Set to this directory “cd ~/rubydev”
  7. On your laptop use “git clone …” to bring the project to your computer. Make sure to clone using ssh, not https.
  8. Add a ruby program file, get the program running in VS Code.
  9. Go to the terminal and do a “get add” to add new files to the local repository.
  10. Do a “git commit -m “message“”.
  11. Do a “git push” to push the new code out to your GitHub account.
  12. Make changes to the program on your laptop.
  13. Do an add, commit, and push again to move the changes back to your GitHub account.
  14. Make sure you can push and pull to the project from both your laptop.
  15. Turn in link to working GitHub project

Scroll to Top