Changes between Version 27 and Version 28 of DeveloperGuidelines/Git
- Timestamp:
- 02/01/12 17:45:18 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Git
v27 v28 1 1 = Git = 2 2 [[TOC]] 3 Sahana Eden uses the Git DVCS & hosts active branches on [https://github.com GitHub] 4 == Developer Workflow == 3 5 === Fork a fresh Branch === 4 6 * Sign-up for an account on [https://github.com GitHub] … … 13 15 }}} 14 16 15 === Developer Workflow===17 === Ongoing Coding === 16 18 We 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 17 19 {{{ … … 68 70 }}} 69 71 Although 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 === 74 If you want to throw away all uncommitted changes (i.e. '{{{bzr revert}}}'), then: 75 {{{ 76 git reset --hard HEAD 77 }}} 78 70 79 === Developer Configuration === 71 80 {{{ … … 85 94 git config --global mergetool.keepBackup false 86 95 }}} 96 87 97 ==== Windows ==== 88 98 Install [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]. … … 92 102 Possibly 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 93 103 94 == How to get your work Merged into Trunk == 104 == Alternate Developer Workflow == 105 This is an alternate woerkflow which we shoudl deprecate after seeing whether anythign should be moved up 95 106 * Make sure your work is fully tested. 96 107 * 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.) … … 122 133 }}} 123 134 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 HEAD128 }}}129 135 == Resources == 130 136 * Community Book: http://book.git-scm.com 131 137 * Tips & Tricks: http://gitready.com 132 138 133 == Why? == 139 == History == 140 === Why? === 134 141 Sahana Eden has decided to move from !Bzr/LaunchPad to !Git/GitHub 135 142 * The current repository is huge & bloated, taking too long to download. … … 137 144 * Web2py no longer supports !Bzr/LaunchPad, so we want to be able to maintain a common tool to work with both repositories. 138 145 * New developers are likely to be more familiar with !Git/GitHub 139 == How? == 146 147 === How? === 140 148 The 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 141 149 142 === Migrating existing Branches===150 ==== Migrating existing Branches ==== 143 151 Merge branch with trunk using normal Bzr tools 144 152