How to use GitKraken

Goal: Be able to clone your project (to download it from GitLab), to edit it locally,and to save your changes to your local git repo and to the GitLab server.

WARNING: You must do this exericse AFTER doing the exercises about working with the GitLab server.
In the previous exercises you made a change to your copy of a project online. 
In this exercise you will download your copy (including those changes) and you will continue to modify it.

You must finish the previous exercises first so that the changes you make at the end of those exercises will be downloaded in the this exercise.
WARNING: It is highly recommended that you read through the tutorial for this material (in addition to watching the video) AND that you follow along with the tutorial / video before trying this exercise.
It's ok if you end up modify the same file several times - just make sure to modify it again for this exercise and put the required text into the Commit Message (as listed below)

What you need to do for this exercise

  1. Remember that you need to do this exercise AFTER you do the previous one.
  2. Here are two ways of describing what you need to do in this exercise.  Please note that these two sentences mean the same thing - the first uses language similiar to how I've described things above, while the second uses the technical jargon for the git program:
    1. For this exercise you must download the project to your computer, modify it (as described below), and then upload your finished work back to the GitLab server.
    2. For this exercise you must pull the git repo to your local machine, modify it (as described below), and then push your commit(s) back to the GitLab server.
  3. Your task is to find the method named RunExercise within the class named Download_Modify_Upload.  You'll notice that there's some code provided to you there already.  After examing the provided code you should modify the RunExercise method.
    First, find the comment which says "// Replace the following code with your own", you'll see a loop below it.  Modify that loop so that the array named theArray is filled with decreasing numbers, but only filling every other array slot. 
    1. First example:
      If the array is 5 elements long then printing the array should produce the following:
      slot 0 contains 5
      slot 1 contains 0
      slot 2 contains 3
      slot 3 contains 0
      slot 4 contains 1
    2. Second example:
      If the array is 10 elements long then printing the array should produce the following:
      slot 0 contains 10
      slot 1 contains 0
      slot 2 contains 8
      slot 3 contains 0
      slot 4 contains 6
      slot 5 contains 0
      slot 6 contains 4
      slot 7 contains 0
      slot 8 contains 2
      slot 9 contains 0
    3. Note: This is supposed to be complicated enough that you're unlikely to be able to just edit this directly on the server.  (I.e., this task is sufficiently complicated that you'll need to download it to your computer in order to work on it)
      AT THE SAME TIME: It's supposed to be easy enough that you're not going to spend a zillion hours working on the code.
      Please let me know if this is actually true.  (I.e., let me know it's easier or harder than was intended)
  4. Once you've successfully modified the project to acheive the above please make sure to commit your work and push (upload) your work back to the GitLab server.  When you commit that file you must use the Commit Message

    WORK_FOR_EXERCISE_4-B

    1. Please copy-and-paste the above bold, underlined message in exactly, so that I can use a script (a short program) to collect this work from you.
  5. If you used a different commit message then you may be able to fix it, but ONLY if you haven't made any more commits after the one with the bad message. 
    Here's a detailed walkthrough showing you how to 'ammend' your most recent commit.
    You may find information about tagging a commit in git when you search online.  Tagging would be a good solution here except that GitKraken doesn't upload tags to the GitLab server, so we can't use them in this course.