Changes between Version 34 and Version 35 of Event/2014/GCI

12/06/14 06:14:21 (9 years ago)
Pat Tressel



  • Event/2014/GCI

    v34 v35  
    3838== Committing Code ==
    40 Please read this, about how to use git and !GitHub.
     40Please read this, about how to use git and !GitHub:
    43 We have some differences for GCI, which are summarized below.
    45 '''''Note we are revising the procedure a bit, so there will be changes gradually appearing here.'''''
     44We have some differences for GCI, which are explained in detail here:
    47 We will be using a !GitHub repository just for GCI, rather than submitting code directly to the main repository.
    48 This will help us conserve the time of the (very busy) folks who have to approve submissions to the main repository.
     46[wiki:DeveloperGuidelines/Git/GCI#StudentWorkflow DeveloperGuidelines/Git/GCI#StudentWorkflow]
    50 You'll use the GCI repository to use for pull requests.[[br]]
    53 But you should still fork the main repository to create your own repository, and then clone your own repository.[[br]]
    56 On your local (cloned) repository, set up a "remote" that points to the GCI repository. Open the repository page:[[br]]
    57 [[br]]
    58 On the right, there will be a box that says "SSH clone URL" or "HTTPS clone URL" -- that will be the URL to use for your new remote.
    59 If you are using git from the command line, cd to your local eden repository, and do this if you are using a password to connect
    60 to !GitHub (this is the "HTTPS clone URL"):
    61 {{{
    62 git remote add edengci
    63 }}}
    64 Or do this if you are using SSH keys to connect to !GitHub (this is the "SSH clone URL"):
    65 {{{
    66 git remote add edengci
    67 }}}
    69 We are going to collect up student work for several days, and then test it and submit it all together to the main repository.
    70 Because of that, we won't update from the main repository during that time. This will fix the problem students saw with having
    71 extra commits from the main repository that were not in the GCI repository appear in their pull requests.
    73 We are going to use a branch called "staging" to hold students' work, so when you are ready to start working on code, you can
    74 pull a copy of this branch to your local repository. This is where you will send pull requests. To get a copy of this branch:
    76 {{{
    77 git pull edengci staging:your-branch-name
    78 }}}
    80 You can call your local branch whatever you want. One suggestion is to pull a fresh copy of the staging branch when you are about
    81 to start a new task. (You can keep any old branch you were working on for previous tasks, or delete it after your pull request for
    82 the previous task is accepted and merged into the staging branch. But it is better not to reuse that branch to avoid unexpected
    83 merge issues with new work. If you want to use the same branch name, then you can rename your old branch.)
    85 Note, your commits will still have your name on them as author when they get into the main repository!
    87 The steps to submit your work are similar to those in the git wiki page linked above -- differences are noted here.
    88 * "Squash" your commits into one.
    89 * ''This is different:'' Don't rebase from the main repository -- instead, rebase *from the staging branch* -- the same branch you will send the pull request to.
    90 {{{
    91 git pull --rebase edengci staging
    92 }}}
    93 * Push your commit to your Eden repository on !GitHub.
    94 * Open the !GitHub page for your Eden repository.
    95 * Click the "Compare and Create Pull Request" button shown on that commit.
    96 * ''This is different:'' The pull request page has a line that shows which repository and branch you are sending the pull request too.
    97   You will need to change both, to the GCI repository and the "staging" branch.
    98   * There will be a down-arrow next to the repository -- that will give you a list of repositories. Select the GCI repository.
    99   * Then use the down-arrow on the branch -- select "staging".
    100 * Create the pull request.
    101 * Continue with the code review as usual.
    10350== Admins and Mentors ==