| 1 | = GitGuideLines = |
| 2 | |
| 3 | As we are several developers who works activly on Midnight Commander we |
| 4 | need a very specific layout so that we always know which fix belongs to |
| 5 | which branch and who is reponsible. |
| 6 | |
| 7 | At first please check out the git repository: |
| 8 | {{{ |
| 9 | git clone ssh://midnight-commander.org:2222/git/mc.git |
| 10 | }}} |
| 11 | |
| 12 | Now you can start to prepare this repository in order to track all |
| 13 | remote branches in local ones: |
| 14 | {{{ |
| 15 | git branch -r |
| 16 | }}} |
| 17 | Will list you all remote branches which are currently available: |
| 18 | {{{ |
| 19 | winnie@energy:~/dev/mc$ git branch -r |
| 20 | origin/10_fish_stalls_on_symlink |
| 21 | origin/125-allocate-and-free-memory-via-wrapper |
| 22 | origin/133_obsolete_autoconf_macros |
| 23 | origin/142_debian_files_syntax |
| 24 | origin/144_procmail_syntax |
| 25 | origin/147_escaping |
| 26 | origin/151_fix_uninitialised_var_edit.c |
| 27 | origin/155_remove_WANT_WIDGETS |
| 28 | origin/16_syntax_differ_c_and_cpp |
| 29 | origin/65_additional_delphi_keywords |
| 30 | origin/HEAD |
| 31 | origin/master |
| 32 | origin/mc-4.6 |
| 33 | origin/mc-ru-fork |
| 34 | origin/utf-8 |
| 35 | winnie@energy:~/dev/mc$ |
| 36 | }}} |
| 37 | You see, this is quite much and the number of branches will certainly |
| 38 | grow further. |
| 39 | As remote branches are not interesting for developing you certainly want |
| 40 | to set up some local branches in order to track there the changes of the |
| 41 | remote branches: |
| 42 | {{{ |
| 43 | git somehow track automatically remote branches FIXME |
| 44 | }}} |
| 45 | Okay.. fine.. now you should see all local branches: |
| 46 | {{{ |
| 47 | winnie@energy:~/dev/mc$ git branch |
| 48 | 10_fish_stalls_on_symlink |
| 49 | 125-allocate-and-free-memory-via-wrapper |
| 50 | 133_obsolete_autoconf_macros |
| 51 | 142_debian_files_syntax |
| 52 | 144_procmail_syntax |
| 53 | 147_escaping |
| 54 | 151_fix_uninitialised_var_edit.c |
| 55 | * 155_remove_WANT_WIDGETS |
| 56 | 16_syntax_differ_c_and_cpp |
| 57 | 65_additional_delphi_keywords |
| 58 | master |
| 59 | mc-4.6 |
| 60 | mc-ru-fork |
| 61 | utf-8 |
| 62 | winnie@energy:~/dev/mc$ |
| 63 | }}} |
| 64 | The "*" marks the branch you are currently in. To switch between |
| 65 | branches simply use: git checkout $branchname. |
| 66 | {{{ |
| 67 | winnie@energy:~/dev/mc$ git checkout master |
| 68 | Switched to branch "master" |
| 69 | winnie@energy:~/dev/mc$ |
| 70 | }}} |
| 71 | Now you are in the branch "master". |
| 72 | |
| 73 | Pleae note that everytime before you start to work on something, please |
| 74 | update your local checkout: |
| 75 | {{{ |
| 76 | git pull |
| 77 | }}} |
| 78 | If there was nothing new you'll see this output |
| 79 | {{{ |
| 80 | Already up-to-date. |
| 81 | }}} |
| 82 | otherwise something like this: |
| 83 | {{{ |
| 84 | FIXME |
| 85 | }}} |
| 86 | |
| 87 | Okay, fine. Now you are able to track changes, in your local repository |
| 88 | and to update it. But in order to use it activly there are plenty more |
| 89 | options... If you are only intrested in tracking the development you can |
| 90 | stop here.. but if you are intrested in active development together with |
| 91 | us, please read further. |