Changes between Version 4 and Version 5 of DeveloperGuidelines/Git/GCI


Ignore:
Timestamp:
12/04/14 16:46:59 (7 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Git/GCI

    v4 v5  
    1010main repository -- combine students' work over several days into one already-reviewed bundle, and submit that as one PR.
    1111
    12 After some head-scratching, discussion, and trial runs with help of GCI students, here is what we are doing.
    13 It may sound complicated, but it is designed to avoid issues we encountered with a less formal procedure, in
    14 which mentors and students were freely updating from the main repository, without coordination.
     12After some head-scratching, discussion, and trial runs with help of GCI students, here are two options we are considering.
     13Both are designed to avoid issues we encountered with a less formal procedure, in which mentors and students were freely
     14updating from the main repository, without coordination.
    1515
    1616We will be using a !GitHub repository just for GCI, rather than submitting code directly to the main repository.
     
    2121However, during GCI, they will submit PRs to the GCI repository. In order to avoid chaos, we will temporarily freeze
    2222the revision level on which students will work -- we will provide a ''base'' branch that students will use to populate
    23 their local working branch for GCI tasks. Students will each have their own branch in the GCI repository to send PRs to
    24 so reviews and merging of PRs for each student can be done asynchronously.
     23their local working branch for GCI tasks.
     24
     25''Optionally'', students will each have their own branch in the GCI repository to send PRs to so reviews and merging
     26of PRs for each student can be done asynchronously, and so students can be released to work on other tasks more
     27quickly, as they will not encounter conflicts.
    2528
    2629We will also have a ''staging'' branch, initially set to the same revision as the base branch, onto which student work
    27 is aggregated. As mentors accept pull requests, they will merge them into the staging branch. If there is a conflict at
    28 this point, it will be with some other student's work, not with an update from the main repository. The mentor can
    29 resolve the conflict (which the student's assistance if needed).
     30is aggregated.
     31
     32The two options diverge at this point:
     33
     34If we are not using separate student branches, then the target of student PRs will be the staging branch.
     35In that case, other students' work will likely be merged into the staging branch while a student's PR is being reviewed,
     36so by the time the PR is ready, there may be a conflict with the other students' work. The mentor will help the student
     37with the appropriate git procedure for rebasing and resolving their conflict. This is much like the normal workflow
     38for submitting to trunk.
     39
     40If we are using student branches in the GCI repository, then students will do PRs to their individual branches there.
     41When a mentor accepts a PR, it will be merged into the students branch in the GCI repository. Since no-one else is
     42updating that branch, there will be no conflict. Mentors will then merge the student's branch into the staging branch.
     43If there is a conflict at this point, it will be with some other student's work, not with an update from the main
     44repository. Conflicts should be relatively easy to resolve, as commits should be small. The mentor can resolve the
     45conflict, with the student's assistance if needed.
    3046
    3147Every few days, we will switch to a fresh base branch. Students can continue with PR reviews already in progress on
     
    3551this point, all branch names will be as they were before, and work can continue as before.
    3652
    37 Also at this point, students' completed PRs are on the staging branch. A designated mentor will prepare the staging
     53At this point, students' completed PRs are on the staging branch. A designated mentor will prepare the staging
    3854branch for a PR to the main repository: If the staging branch is not mergeable, the mentor can pull the staging branch
    3955to their local repository, merge from the main repository, fix up conflicts, and push to the staging branch again.