Changes between Version 27 and Version 28 of DeveloperGuidelines/Git


Ignore:
Timestamp:
02/01/12 17:45:18 (10 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Git

    v27 v28  
    11= Git =
    22[[TOC]]
     3Sahana Eden uses the Git DVCS & hosts active branches on [https://github.com GitHub]
     4== Developer Workflow ==
    35=== Fork a fresh Branch ===
    46* Sign-up for an account on [https://github.com GitHub]
     
    1315}}}
    1416
    15 === Developer Workflow ===
     17=== Ongoing Coding ===
    1618We suggest adopting the [http://blog.hasmanythrough.com/2008/12/18/agile-git-and-the-story-branch-pattern Story Branch] pattern, which allows squashing commits in order to keep the main Trunk as clean as possible
    1719{{{
     
    6870}}}
    6971Although on Windows this seems by default to produce UTF-16 files! ('UCS-2 Little Endian'). A script to make this process easier for Windows users is attached: [http://eden.sahanafoundation.org/attachment/wiki/DeveloperGuidelines/Git/merge.cmd merge.cmd]
     72
     73=== Reverting to last committed code ===
     74If you want to throw away all uncommitted changes (i.e. '{{{bzr revert}}}'), then:
     75{{{
     76git reset --hard HEAD
     77}}}
     78
    7079=== Developer Configuration ===
    7180{{{
     
    8594git config --global mergetool.keepBackup false
    8695}}}
     96
    8797==== Windows ====
    8898Install [http://sourceforge.net/projects/console/ Console] & [http://www.sourcegear.com/diffmerge/downloads.php Diffmerge] & [http://markembling.info/2009/09/my-ideal-powershell-prompt-with-git-integration configure Powershell].
     
    92102Possibly we could add a pre-commit hook to run tests, e.g. based on http://tech.yipit.com/2011/11/16/183772396/ or http://blog.penzilla.net/2011/09/git-pre-commit-hook-for-python-now-with.html
    93103
    94 == How to get your work Merged into Trunk ==
     104== Alternate Developer Workflow ==
     105This is an alternate woerkflow which we shoudl deprecate after seeing whether anythign should be moved up
    95106 * Make sure your work is fully tested.
    96107 * Tell git about any new files you've added. If you've added a new directory, you can just add the files in the directory and git will add the directory too. (Do "git help add" for a description of how to use the bzr add command.)
     
    122133}}}
    123134
    124 == Reverting to last committed code ==
    125 If you want to throw away all uncommitted changes (i.e. '{{{bzr revert}}}'), then:
    126 {{{
    127 git reset --hard HEAD
    128 }}}
    129135== Resources ==
    130136* Community Book: http://book.git-scm.com
    131137* Tips & Tricks: http://gitready.com
    132138
    133 == Why? ==
     139== History ==
     140=== Why? ===
    134141Sahana Eden has decided to move from !Bzr/LaunchPad to !Git/GitHub
    135142* The current repository is huge & bloated, taking too long to download.
     
    137144* Web2py no longer supports !Bzr/LaunchPad, so we want to be able to maintain a common tool to work with both repositories.
    138145* New developers are likely to be more familiar with !Git/GitHub
    139 == How? ==
     146
     147=== How? ===
    140148The preferred approach is to have a clean repository, in order to get the maximum benefit from the migration...although it is technically possible to [http://fearthecowboy.com/2011/04/29/converting-bazaar-repositories-to-git/ migrate the commit history]. Commit History will instead be maintained on the !LaunchPad site as an archive
    141149
    142 === Migrating existing Branches ===
     150==== Migrating existing Branches ====
    143151Merge branch with trunk using normal Bzr tools
    144152