Changes between Version 4 and Version 5 of GitGuideLines


Ignore:
Timestamp:
05/14/17 06:09:20 (8 years ago)
Author:
andrew_b
Comment:

Fix URL. Remove trailing spaces. Remove hardcoded line breaks.

Legend:

Unmodified
Added
Removed
Modified
  • GitGuideLines

    v4 v5  
    1 = GitGuideLines =                                                                                                                                                                                                   
     1= GitGuideLines                                                 
    22 
    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.                                     
     3As we are several developers who works activly on Midnight Commander we need a very specific layout so that we always know which fix belongs to which branch and who is reponsible. 
    64 
    75At first please check out the git repository: 
    8 {{{                                           
    9   git clone ssh://midnight-commander.org:22/git/mc.git 
    10 }}}                                                      
     6{{{ 
     7  git clone git@github.com:MidnightCommander/mc.git 
     8}}} 
     9or 
     10{{{ 
     11  git clone https://github.com/MidnightCommander/mc.git 
     12}}} 
    1113 
    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                                                      
     14Now you can start to prepare this repository in order to track all remote branches in local ones: 
     15{{{ 
     16  git branch -r 
     17}}} 
     18Will list you all remote branches which are currently available: 
     19{{{   
     20  winnie@energy:~/dev/mc$ git branch -r 
     21  origin/10_fish_stalls_on_symlink                            
     22  origin/125-allocate-and-free-memory-via-wrapper 
     23  origin/133_obsolete_autoconf_macros 
     24  origin/142_debian_files_syntax 
     25  origin/144_procmail_syntax 
     26  origin/147_escaping 
     27  origin/151_fix_uninitialised_var_edit.c 
     28  origin/155_remove_WANT_WIDGETS                          
     29  origin/16_syntax_differ_c_and_cpp 
     30  origin/65_additional_delphi_keywords 
     31  origin/HEAD 
    3132  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 checkout origin/65_additional_delphi_keywords -b 65_additional_delphi_keywords 
    44 }}}                                                                      
    45 Of course you can also choose another name for your local branch, but choosing the same as used remote makes the most sense. 
    46 Okay.. fine.. now you should see all local branches:                     
    47 {{{                                                                      
    48   winnie@energy:~/dev/mc$ git branch                                     
    49   10_fish_stalls_on_symlink                                              
    50   125-allocate-and-free-memory-via-wrapper                               
    51   133_obsolete_autoconf_macros                                           
    52   142_debian_files_syntax                                                
    53   144_procmail_syntax                                                    
    54   147_escaping                                                           
    55   151_fix_uninitialised_var_edit.c                                       
    56 * 155_remove_WANT_WIDGETS                                                
    57   16_syntax_differ_c_and_cpp                                             
    58   65_additional_delphi_keywords                                          
    59   master                                                                 
    60   mc-4.6                                                                 
    61   mc-ru-fork                                                             
    62   utf-8                                                                  
    63 winnie@energy:~/dev/mc$                                                  
    64 }}}                                                                      
    65 The "*" marks the branch you are currently in. To switch between         
    66 branches simply use: git checkout $branchname.                           
    67 {{{                                                                      
    68   winnie@energy:~/dev/mc$ git checkout master                            
     33  origin/mc-4.6 
     34  origin/mc-ru-fork 
     35  origin/utf-8 
     36  winnie@energy:~/dev/mc$ 
     37}}} 
     38You see, this is quite much and the number of branches will certainly grow further. 
     39As remote branches are not interesting for developing you certainly want to set up some local branches in order to track there the changes of the remote branches: 
     40{{{ 
     41  git checkout 65_additional_delphi_keywords 
     42}}} 
     43Of course you can also choose another name for your local branch, but choosing the same as used remote makes the most sense. Okay.. fine.. now you should see all local branches: 
     44{{{ 
     45  winnie@energy:~/dev/mc$ git branch 
     46  10_fish_stalls_on_symlink 
     47  125-allocate-and-free-memory-via-wrapper 
     48  133_obsolete_autoconf_macros 
     49  142_debian_files_syntax 
     50  144_procmail_syntax 
     51  147_escaping 
     52  151_fix_uninitialised_var_edit.c 
     53* 155_remove_WANT_WIDGETS 
     54  16_syntax_differ_c_and_cpp 
     55  65_additional_delphi_keywords 
     56  master 
     57  mc-4.6 
     58  mc-ru-fork 
     59  utf-8 
     60winnie@energy:~/dev/mc$ 
     61}}} 
     62The "*" marks the branch you are currently in. To switch between branches simply use: git checkout $branchname. 
     63{{{ 
     64  winnie@energy:~/dev/mc$ git checkout master 
    6965  Switched to branch "master" 
    7066  winnie@energy:~/dev/mc$ 
     
    7268Now you are in the branch "master". 
    7369 
    74 Pleae note that everytime before you start to work on something, please 
    75 update your local checkout: 
     70Pleae note that everytime before you start to work on something, please update your local checkout: 
    7671{{{ 
    7772  git pull 
     
    8681  remote: Compressing objects: 100% (10/10), done. 
    8782  remote: Total 10 (delta 8), reused 0 (delta 0) 
    88   Unpacking objects: 100% (10/10), done.         
    89   From ssh://midnight-commander.org:22/git/mc  
     83  Unpacking objects: 100% (10/10), done. 
     84  From ssh://midnight-commander.org:22/git/mc 
    9085     6f8a3b3..8ebe787  151_fix_uninitialised_var_edit.c -> origin/151_fix_uninitialised_var_edit.c 
    9186     aeec284..f2f8ef4  master     -> origin/master 
    9287}}} 
    9388 
    94 Okay, fine. Now you are able to track changes, in your local repository 
    95 and to update it. But in order to use it activly there are plenty more 
    96 options... If you are only intrested in tracking the development you can 
    97 stop here.. but if you are intrested in active development together with 
    98 us, please read further. 
     89Okay, fine. Now you are able to track changes, in your local repository and to update it. But in order to use it activly there are plenty more options... If you are only intrested in tracking the development you can stop here.. but if you are intrested in active development together with us, please read further.