Installing Git on your Machine
Windows users
Download and install git bash for windows: https://gitforwindows.org/
Once downloaded and installed, open gitbash. You will be in your home directory. Create a .ssh directory (if you don’t already have one). Nnote that any directory that starts with a dot (.) is a hidden directory. Copy your id_rsa file from hopper to your machine. You can use this linux command for it:
scp <SLUNetId>@hopper.slu.edu:/student/SLUNetId/.ssh/id_rsa ./
You’ll be prompted for your password, enter your linux account password.
After installing gitbash, you can use it as if it were a linux terminal with git installed:
- mkdir csci2300
- cd csci2300
- git clone git@git.cs.slu.edu:courses/spring20/csci_2300/<SLUNet ID>.git
- cd <SLUNet ID>
- mkdir lab0
- put your HelloWorld.java into lab0 directory
- git add lab0
- git commit lab0 -m “committing lab 0”
- git push
- Verify that your commit worked by logging in to git.cs.slu.edu via the web browser.
Mac users
Download and install git for mac: https://git-scm.com/download/mac
Once installed, open a mac terminal. Create a .ssh directory (if you don’t already have one). Copy your id_rsa file from hopper to your machine: scp <SLUNetId>@hopper.slu.edu:/student/SLUNetId/.ssh/id_rsa ./
You’ll be prompted for your password, enter your linux account password.
After this, you should be able to use the commands we discussed in class:
- mkdir csci2300
- cd csci2300
- git clone git@git.cs.slu.edu:courses/spring20/csci_2300/<SLUNet ID>.git
- cd <SLUNet ID>
- mkdir lab0
- put your HelloWorld.java into lab0 directory
- git add lab0
- git commit lab0 -m “committing lab 0”
- git push
- Verify that your commit worked by logging in to git.cs.slu.edu via the web browser.