docs: Update development chapter.

Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/09349345
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/09349345
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/09349345

Branch: refs/heads/trunk
Commit: 0934934547329943cf474708d3f39b47d8ae3c5f
Parents: 4f721c2
Author: Tomaz Muraus <[email protected]>
Authored: Sat Oct 26 15:07:03 2013 +0200
Committer: Tomaz Muraus <[email protected]>
Committed: Sat Oct 26 15:08:27 2013 +0200

----------------------------------------------------------------------
 docs/development.rst | 48 ++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/09349345/docs/development.rst
----------------------------------------------------------------------
diff --git a/docs/development.rst b/docs/development.rst
index d5c1413..d300133 100644
--- a/docs/development.rst
+++ b/docs/development.rst
@@ -19,7 +19,8 @@ Style guide
 * Use 79 characters in a line
 * Make sure edited file doesn't contain any trailing whitespace
 * You can verify that your modifications don't break any rules by running the
-  ``flake8 script - e.g. flake8 libcloud/edited_file.py.`` or ``tox -e lint``.
+  ``flake8`` script - e.g. ``flake8 libcloud/edited_file.py.`` or
+  ``tox -e lint``.
   Second command fill run flake8 on all the files in the repository.
 
 Git pre-commit hook
@@ -91,6 +92,51 @@ pull request has been reviewed, all the comments have been 
addresses and it's
 ready to be merged, user who submitted the pull request must close the pull
 request, create a patch and attach it to the original JIRA ticket.
 
+Syncing your git(hub) repository with an official upstream git repository
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This section describes how to synchronize your git clone / Github fork with
+an official upstream repository.
+
+It's important that your repository is in-sync with the upstream one when you
+start working on a new branch and before you generate a final patch. If the
+repository is not in-sync, generated patch will be out of sync and we won't be
+able to cleanly merge it into trunk.
+
+To synchronize it, follow the steps bellow in your git clone:
+
+1. Add upstream remote if you haven't added it yet
+
+.. sourcecode:: bash
+
+    git remote add upstream 
https://git-wip-us.apache.org/repos/asf/libcloud.git
+
+2. Synchronize your ``trunk`` branch with an upstream one
+
+.. sourcecode:: bash
+
+    git checkout trunk
+    git pull upstream trunk
+
+3. Create a branch for your changes and start working on it
+
+.. sourcecode:: bash
+
+    git checkout -b my_new_branch
+
+4. Before generating a final patch which is to be attached to the JIRA ticket,
+   make sure your repository and branch is still in-sync
+
+.. sourcecode:: bash
+
+    git pull upstream trunk
+
+5. Generate a patch which can be attached to the JIRA ticket
+
+.. sourcecode:: bash
+
+    git format-patch --stdout remotes/upstream/trunk > patch_name.patch
+
 Contributing Bigger Changes
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

Reply via email to