Exercise 3
This week, we are going to start using git in the way that it was intended and in the way that it is used in the software development field. Instead of downloading the files that you need from GitHub as you have been doing, you will clone the repository that is created when you accept the assignment using the terminal. Please learn how to do this! If you are having trouble, make sure you talk to me. To start, first accept the assignment by going to https://classroom.github.com/a/ksnRcHfv.
Once you’ve accepted the assignment, click on the “Code” button and make sure the “SSH” tab is selected. Then copy the link that shows in the text box (for example, mine is git@github.com:emuphysics/exercise03-dpawlows.git).
Next, upen the Terminal or Powershell program. Use the cd command to change your current working directory to the one that you use for Phy280 work. For example, I might use something like:
cd Documents/Phy280/Assignments/
Finally, clone your github repository using the git clone command as described in Using git. This should result in the creation of a local repository on your computer created in the folder in which you executed the clone command. You should follow the instructions in the readme to complete the assignment. Then when you are finished, use the git workflow to commit your changes locally and push them to your remote repository on GitHub where I can access them. Again, you need to use the git commands while working in the directory that contains your project.
Note
Once you are able to use git properly, If you are ever working on an assignment and you have an issue and would like my help, you can commit your code changes and push them to GitHub. That way, I can see what you are working on and where the issue is, and even make comments right in your code and you don’t have to take a screen shot or attach a file or anything.