5 | | == Browsing source code on the web == |
6 | | |
7 | | You can browse the BOINC code using [/browser a web-based interface] ([http://boinc.berkeley.edu/gitweb/ alternative]). |
8 | | This is useful for getting individual files, or seeing the revision history. |
| 5 | == Getting a copy of the BOINC source == |
| 6 | |
| 7 | The BOINC source is stored in a [http://www.git-scm.com Git] repository. |
| 8 | To clone the repository into a directory called (for example) 'boinc', run: |
| 9 | |
| 10 | {{{ |
| 11 | git clone git://boinc.berkeley.edu/boinc-v2.git boinc |
| 12 | }}} |
| 13 | |
| 14 | or, using HTTP: |
| 15 | |
| 16 | {{{ |
| 17 | git clone http://boinc.berkeley.edu/git/boinc-v2.git boinc |
| 18 | }}} |
| 19 | |
| 20 | On Windows, you'll need a Git client such as !TortoiseGit (see below). |
| 21 | Right-click on the parent directory, select 'Git Clone...', and fill in the dialog with one of the above URLs. |
| 22 | Don't forget to remove both 'git clone' and 'boinc' from the commands above. |
| 23 | |
| 24 | The 'clone' operation pulls down ~134 MB of source and gives you a copy that you can modify and compile locally. |
| 25 | However, you will not be able to push changes to the BOINC repository. |
| 26 | For write access, see further below. |
| 27 | |
| 28 | Change to the directory 'boinc'. |
| 29 | Here you find the files corresponding to the HEAD of the 'remote master branch'. |
| 30 | The development history of the project can be found in the 'boinc/.git' subdirectory. |
| 31 | |
| 32 | You can replace the files on your 'master branch' by files from older branches or older tags using the appropriate git command - without |
| 33 | needing to contact the Git repository server again as all the history can be found under 'boinc/.git'. |
| 34 | This is called 'checking out'. |
| 35 | |
| 36 | Run `git status` to see whether there are any changes relative to the HEAD of the 'remote master branch': |
| 37 | |
| 38 | {{{ |
| 39 | $ cd boinc |
| 40 | |
| 41 | $ git status |
| 42 | # On branch master |
| 43 | nothing to commit, working directory clean |
| 44 | }}} |
32 | | == Getting a copy of the BOINC source == |
33 | | |
34 | | To clone the BOINC Git repository into a local directory called (for example) 'boinc', run: |
35 | | |
36 | | {{{ |
37 | | git clone git://boinc.berkeley.edu/boinc-v2.git boinc |
38 | | }}} |
39 | | |
40 | | or, using HTTP: |
41 | | |
42 | | {{{ |
43 | | git clone http://boinc.berkeley.edu/git/boinc-v2.git boinc |
44 | | }}} |
45 | | |
46 | | On Windows, you'll need a Git client such as !TortoiseGit (see below). |
47 | | Right-click on the parent directory, select 'Git Clone...', and fill in the dialog with one of the above URLs. Don't forget to remove both 'git clone' and 'boinc' from the commands above. |
48 | | |
49 | | The 'clone' operation pulls down ~134 MiB of source and gives you a copy that you can modify and compile locally. However, you will not be able to push changes to the BOINC repository. For write access, see further below. |
50 | | |
51 | | Change to the directory 'boinc'. Here you find the files corresponding to the HEAD of the 'remote master branch', the bleeding edge of development. The fully navigable development history of the project can be found in the 'boinc/.git' subdirectory. |
52 | | |
53 | | You can replace the files on your 'master branch' by files from older branches or older tags using the appropriate git command - without |
54 | | needing to contact the Git repository server again as all the history can be found under 'boinc/.git'. This is called 'checking out'. |
55 | | |
56 | | Run `git status` to see whether there are any changes relative to the HEAD of the 'remote master branch': |
57 | | |
58 | | {{{ |
59 | | $ cd boinc |
60 | | |
61 | | $ git status |
62 | | # On branch master |
63 | | nothing to commit, working directory clean |
64 | | }}} |
| 69 | == Browsing source code on the web == |
| 70 | |
| 71 | You can browse the BOINC code using [/browser a web-based interface] ([http://boinc.berkeley.edu/gitweb/ alternative]). |
| 72 | This is useful for getting individual files, or seeing the revision history. |
70 | | * '''remote tags''': |
71 | | These are snapshots of the state of development taken at a specific point in time. You can check out a 'remote tag', but you should not modify the files thus checked out - for that you need a separate branch (which can be created later though). |
72 | | The tag's name indicates what's in there. For example, the release of BOINC client version 7.0.60 has been given then tag 'client_release/7.0/7.0.60'. |
| 78 | * '''remote tags''': |
| 79 | These are snapshots of the state of development taken at a specific point in time. |
| 80 | You can check out a 'remote tag', but you should not modify the files thus checked out - |
| 81 | for that you need a separate branch (which can be created later though). |
| 82 | The tag's name indicates what's in there. For example, the release of BOINC client version 7.0.60 |
| 83 | has been given then tag 'client_release/7.0/7.0.60'. |
74 | | * '''remote branches''': |
75 | | BOINC developers perform long-running work on source code that needs to be visible to other members of the team by working on a 'remote branch'. There are: |
76 | | * The '''remote master branch''': This is the most recent version of the source code. It always exists, contains the freshest code and has not necessarily been thoroughly tested. |
77 | | * '''Other branches''': For example, work on version 6.12 of BOINC that is not done in the 'remote master branch', (let's say because of the need for a immediate bugfix) may be done in a remote branch called 'client_release/6/6.12'. |
78 | | Run `git remote show origin` to list the remote branches. |
| 85 | * '''remote branches''': |
| 86 | BOINC developers perform long-running work on source code that needs to be visible to other members of the team |
| 87 | by working on a 'remote branch'. There are: |
| 88 | * The '''remote master branch''': This is the most recent version of the source code. |
| 89 | It always exists, contains the freshest code and has not necessarily been thoroughly tested. |
| 90 | * '''Other branches''': For example, work on version 6.12 of BOINC that is not done in the 'remote master branch', |
| 91 | (let's say because of the need for a immediate bugfix) may be done in a remote branch called 'client_release/6/6.12'. |
| 92 | |
| 93 | Run `git remote show origin` to list the remote branches. |
80 | | As you cloned the Git repository, a 'local master branch' was created. This initially corresponds to the 'remote master branch', but once you start editing files, it will of course deviate from it. |
81 | | |
82 | | You can create local branches and tags (both invisible to anyone but yourself). You can check out a specific 'remote tag' to compile, or you can create a local branch based on a specific 'remote tag' to work on the code. |
| 95 | As you cloned the Git repository, a 'local master branch' was created. |
| 96 | This initially corresponds to the 'remote master branch', but once you start editing files, it will of course deviate from it. |
| 97 | |
| 98 | You can create local branches and tags (both invisible to anyone but yourself). |
| 99 | You can check out a specific 'remote tag' to compile, |
| 100 | or you can create a local branch based on a specific 'remote tag' to work on the code. |
89 | | If you want to have an overview of the development history, refer to [http://stackoverflow.com/questions/1057564/pretty-git-branch-graphs - this discussion on stack overflow] about generating pretty pictures of the same. |
90 | | |
91 | | For the impatient living on Unix, follow Slipp D. Thompson's idead and edit (or create) your '~/.gitconfig' file, adding the following command aliases: |
| 108 | If you want to have an overview of the development history, |
| 109 | refer to [http://stackoverflow.com/questions/1057564/pretty-git-branch-graphs - this discussion on stack overflow] |
| 110 | about generating pretty pictures of the same. |
| 111 | |
| 112 | For the impatient living on Unix, follow Slipp D. Thompson's idead and edit (or create) |
| 113 | your '~/.gitconfig' file, adding the following command aliases: |