From: abn Date: Fri, 7 Mar 2014 14:20:34 +0000 (+0100) Subject: Git doc: avoid mentioning 'git push -u' to force users to specify the full repo and... X-Git-Tag: V7_6_0a1~2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e8a7a2d80feaa2723b053ee64281a2798b551fa7;p=tools%2Fdocumentation.git Git doc: avoid mentioning 'git push -u' to force users to specify the full repo and branch name each time. --- diff --git a/dev/git/Git_Simple_Write_Procedure.rst b/dev/git/Git_Simple_Write_Procedure.rst index 628882f..97e2a39 100644 --- a/dev/git/Git_Simple_Write_Procedure.rst +++ b/dev/git/Git_Simple_Write_Procedure.rst @@ -8,10 +8,10 @@ Get your copy of the central repository 1. Clone the latest version of the repository for the module you want to modify:: - git clone ssh:// + git clone ssh:// - This retrieves a local copy of the module's repository onto your machine. + This retrieves a local copy of the module's repository onto your machine. The repository URL should have been given to you before you start. 2. If you were already given a branch name to work with, you can simply retrieve it and start working:: @@ -26,22 +26,17 @@ Get your copy of the central repository git checkout -b - where are you initials (John Smith gives 'jsm') and is a small string indicating what changes will be made. For example:: + where are you initials (John Smith gives 'jsh') and is a small string indicating what changes will be made. For example:: - jsm/new_viewer + jsh/new_viewer The last command creates the branch locally, and update your working directory (i.e. the source code) to match this branch: every change and commit you make from now on will be stored in this branch. 4. Publish your branch to the central repository for the first time:: - git push -u origin - - - The option "-u" ensure your local branch will be easily synchronized with the remote copy on the central server. With older versions of Git you might have to execute the above in two steps:: - git push origin - git branch -u origin/ + Workflow @@ -50,7 +45,7 @@ Workflow 1. If you didn't update your local copy for a while, update it with the following command. This retrieves from the central server all changes published by other people working on your branch. This step is not necessary if you just initialized your repository as described above:: git checkout - git pull + git pull origin 2. Do your changes, compile. 3. Perform the appropriate tests to ensure the changes work as expected. @@ -76,7 +71,7 @@ Workflow 6. Once you feel everything is ready to be seen by the rest of the world, you can publish your work. The first step is to synchronize again with any potential change published in your branch on the central repository. This can happen while you were working locally:: - git pull + git pull origin 7. At this stage, two situations can arise. If nothing (or some unrelated stuff to your work) happened on the central repository, Git will not complain (or potentially do an automatic merge). You can inspect the latest changes committed by others with commands like:: @@ -105,7 +100,7 @@ Workflow 9. When all conflicts are solved (and the code has been compiled and tested again if needed) you can finally publish your work to the central repository:: - git push + git push origin This makes your changes visible to others.