Skip to content
Moodle
Git Tutorial
- 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. - 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) - Create a GitHub account with your Kenyon Address. (If you haven’t already).
- Create a new project. Click on the checkbox to add a README.md file. Add some text to the README.md.
- 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. - Create a directory on your computer “~/rubydev”. Set to this directory “cd ~/rubydev”
- On your laptop use “git clone …” to bring the project to your computer. Make sure to clone using ssh, not https.
- Add a ruby program file, get the program running in VS Code.
- Go to the terminal and do a “get add” to add new files to the local repository.
- Do a “git commit -m “message“”.
- Do a “git push” to push the new code out to your GitHub account.
- Make changes to the program on your laptop.
- Do an add, commit, and push again to move the changes back to your GitHub account.
- Make sure you can push and pull to the project from both your laptop.
- Turn in link to working GitHub project