Changes between Initial Version and Version 1 of DeveloperGuidelines/Git


Ignore:
Timestamp:
12/20/11 17:31:03 (13 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Git

    v1 v1  
     1= Git =
     2[[TOC]]
     3Sahana Eden has decided to move from !Bzr/LaunchPad to !Git/GitHub
     4== Why? ==
     5* The current repository is huge & bloated, taking too long to download.
     6* Even simple changes take an age to Pull down to servers
     7* Web2py no longer supports !Bzr/LaunchPad, so we want to be able to maintain a common tool to work with both repositories.
     8* New developers are likely to be more familiar with !Git/GitHub
     9== How? ==
     10The 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
     11=== Migrating Branches ===
     12Fork on !GitHub: https://github.com/flavour/eden/fork_select
     13{{{
     14mv eden <mybranch>
     15git clone git@github.com:<mygitusername>/eden.git
     16cd eden
     17diff -u ../<mybranch> > ../mybranch.diff
     18patch -p0 < ../mybranch.diff
     19git commit -a
     20git push origin master
     21git remote add upstream git://github.com/flavour/eden.git
     22}}}
     23=== Developer Workflow ===
     24We 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 origin
     25{{{
     26cd <mybranch>
     27
     28}}}
     29=== Developer Configuration ===
     30{{{
     31git config --global user.name "Your Name"
     32git config --global user.email your@email.com
     33git config --global github.user yourgithubusername
     34git config --global github.token yourtoken
     35git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
     36git config --global merge.tool diffmerge
     37git config --global diff.tool diffmerge
     38git config --global difftool.diffmerge.cmd 'C:/Program Files (x86)/Git/etc/wrappers/git-diff-diffmerge-wrapper.sh' "$LOCAL" "$REMOTE"
     39git config --global difftool.prompt false
     40git config --global merge.tool diffmerge
     41git config --global mergetool.diffmerge.cmd 'C:/Program Files (x86)/Git/etc/wrappers/git-merge-diffmerge-wrapper.sh' "$PWD/$LOCAL" "$PWD/$BASE" "$PWD/$REMOTE" "$PWD/$MERGED"
     42git config --global mergetool.prompt false
     43git config --global mergetool.trustExitCode false
     44git config --global mergetool.keepBackup false
     45}}}
     46==== Windows ====
     47Install [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].
     48=== Developer Tools ===
     49Pre-commit hook to update VERSION (& run tests?), e.g. based on http://tech.yipit.com/2011/11/16/183772396/
     50== Resources ==
     51* Community Book: http://book.git-scm.com
     52* Tips & Tricks: http://gitready.com