6 Replies Latest reply: Jul 29, 2010 2:39 PM by Ken Gullaksen RSS

Contributing and Pushing changes on github

Ken Gullaksen Novice

After a discussion with Aslak on IRC we see the need to clarify the routine for contributing changes now that ShrinkWrap is on Github.

 

Currently we have landed on sending a pull request after the changes are committed to the developers clone.

This does pose a problem, cause currently we can not send pull requests to ShrinkWrap since it is an organization, and not a user (ref:  http://support.github.com/discussions/site/1682-incorrect-fork-count-and-cannot-send-pull-request-to-repo-owner)

 

Workaround for now is to send pull requests to admin/users with R/W priv, and then have them pull, and push to  ShrinkWrap central repo.

 

Just want to get a thread started where we can get the routine down the way that is best, and then based on the outcome update the Development And Contribution doc page.

  • 1. Re: Contributing and Pushing changes on github
    Andrew Rubinger Master

    I'm not seeing this issue; am I simply not affected by this bug?  Can issue pull requests to the organization just fine, and choose which admins specifically to request to.

     

    screenshot1.png

     

    S,

    ALR

  • 2. Re: Contributing and Pushing changes on github
    Andrew Rubinger Master

    Ken Gullaksen wrote:

     

    Workaround for now is to send pull requests to admin/users with R/W priv, and then have them pull, and push to  ShrinkWrap central repo.

    Yes, this is pretty standard practice, though it should be possible to send pull requests to committers via the authoritative repo.

     

    S,

    ALR

  • 3. Re: Contributing and Pushing changes on github
    Andrew Rubinger Master

    Michael Schuetz notes you must have cloned the authoritative repo to see the "Pull Request" button.

     

    Either way, this mechanism is just a convenience.  Pull requests may also be emailed or made via IRC.  If you want to update the Wiki to formalize this process, great.

     

    S,

    ALR

  • 4. Re: Contributing and Pushing changes on github
    Ken Gullaksen Novice

    So an overview of the process could be:

     

    When starting work on an issue, pull from master, then:

    1. Create a branch with JIRA ISSUE as name. e.g. SHRINKWRAP-214

    2. Do your stuff and commit and push.

    3. Issue a Pull Request with message like: "SHRINKWRAP-214 branch ready to be pulled"

     

    Also as Aslak noted, we could work on several levels, like if an Issue depends on another. then branch out again from 214 to say 213. Then when 213 is done, push up to 214, branch then issue pull request saying "214 with dependencies: 213, is done"

  • 5. Re: Contributing and Pushing changes on github
    Ken Gullaksen Novice

    Andrew Rubinger wrote:

     

    I'm not seeing this issue; am I simply not affected by this bug?  Can issue pull requests to the organization just fine, and choose which admins specifically to request to.

     

    screenshot1.png

     

    S,

    ALR

    Yeah, I can choose which admins to send to, but not to send to the organization itself. So I can send to ALR, aslak, and michaelschuetz but when I search for shrinkwrap, I only get "Ploongle" as a choice, hehe.

  • 6. Re: Contributing and Pushing changes on github
    Ken Gullaksen Novice

    Ken Gullaksen wrote:

     

    So an overview of the process could be:

     

    When starting work on an issue, pull from master, then:

    1. Create a branch with JIRA ISSUE as name. e.g. SHRINKWRAP-214

    2. Do your stuff and commit and push.

    3. Issue a Pull Request with message like: "SHRINKWRAP-214 branch ready to be pulled"

     

    Also as Aslak noted, we could work on several levels, like if an Issue depends on another. then branch out again from 214 to say 213. Then when 213 is done, push up to 214, branch then issue pull request saying "214 with dependencies: 213, is done"

    More specific:

     

    1. Pull latest from remote

     

    $ git pull upstream master 

     

    2. make branch for issue

     

    $ git branch SHRINKWRAP-214 

     

    3. switch to issue branch

     

    $ git checkout SHRINKWRAP-214 

     

    4. add your changes (we preferably want one commit to local repo containing all changes. As an atomic unit of work. So changes can be rolled back for one commit without affecting other things)

     

    5. commit your changess with descriptive message and containing JIRA issue reference

     

    $  git commit 

     

    6. review your changes. things you can use include:

     

    $ gitk 

     

    and

     

    $ git log -p -1  

     

    NOTE: if you see that you have errors in the commit, you can fix the branch in several ways, described next section.

     

    7. push branch to authorative repo

     

    $ git push origin SHRINKWRAP-214 

     

    8. issue a pull request using the git gui, or you could email

    -


    Fixing branch can be done in several ways, including the following:

     

    Delete the branch and create a new one

     

    $ git checkout master 

     

    $ git branch -D SHRINKWRAP-214 

     

    and If you have pushed the branch (note the colon)

     

    $ git push origin :SHRINKWRAP-214 

     

    create a new branch

     

    $ git branch SHRINKWRAP-214 

     

    switch to branch

     

    $ git checkout SHRINKWRAP-214