| 1 | FWIW, here are the basic commands I use for working with the Rakudo git repository on a regular basis. This is based on a very svn-centric view of working with a repository; git allows other management models, but this one seems to work well for Rakudo. Note that I have a commitbit to the Rakudo master repository -- see below for the workflow for non-commitbit users. |
| 2 | |
| 3 | |
| 4 | 1. To checkout a copy of the master repository: |
| 5 | {{{ |
| 6 | git clone git@github.com:rakudo/rakudo.git}}} |
| 7 | }}} |
| 8 | |
| 9 | 2. To modify files in my local copy of the repository |
| 10 | {{{ |
| 11 | cd rakudo |
| 12 | vi src/foo.txt |
| 13 | }}} |
| 14 | |
| 15 | 3. To commit those modified files to my local copy of the repository, any of |
| 16 | {{{ |
| 17 | git commit src/foo.txt # just one file |
| 18 | git commit src # all modified files in src/ |
| 19 | git commit . # all modified files in current dir and below |
| 20 | }}} |
| 21 | |
| 22 | 4. To add and commit a file to the local repo |
| 23 | {{{ |
| 24 | git add src/bar.txt |
| 25 | git commit src/bar.txt |
| 26 | }}} |
| 27 | |
| 28 | 5. To grab any other updates from the master repository |
| 29 | {{{ |
| 30 | git pull |
| 31 | }}} |
| 32 | |
| 33 | 6. To push the changes in my local repository back to the master repository |
| 34 | {{{ |
| 35 | git push |
| 36 | }}} |
| 37 | |
| 38 | That covers 90% of my usage of git for the Rakudo repository. If I didn't have a commitbit to the master repository, a simple mechanism for creating a patch that can be submitted to RT is: |
| 39 | |
| 40 | 1. Get a copy of the master repository |
| 41 | {{{ |
| 42 | git clone git://github.com/rakudo/rakudo.git # note this is different for non-committers |
| 43 | }}} |
| 44 | |
| 45 | 2. Modify files in my local repository |
| 46 | {{{ |
| 47 | vi src/foo.txt |
| 48 | }}} |
| 49 | |
| 50 | 3. Format the patch for RT: |
| 51 | {{{ |
| 52 | git diff >mypatch.diff |
| 53 | # send mail to rakudobug@perl.org with mypatch.diff as an attachment |
| 54 | }}} |
| 55 | |