]> git.proxmox.com Git - ceph.git/blobdiff - ceph/doc/dev/developer_guide/basic-workflow.rst
import ceph quincy 17.2.4
[ceph.git] / ceph / doc / dev / developer_guide / basic-workflow.rst
index 6bd98ebb4501c9a26bb01492eb6de55035b05f75..eddc2fe7bb7772c9c30bb0075fd55a1ba6dfdee3 100644 (file)
@@ -1,3 +1,5 @@
+.. _basic workflow dev guide:
+
 Basic Workflow
 ==============
 
@@ -8,7 +10,7 @@ The following chart illustrates the basic Ceph development workflow:
             Upstream Code                       Your Local Environment
 
            /----------\        git clone           /-------------\
-           |   Ceph   | -------------------------> | ceph/master |
+           |   Ceph   | -------------------------> | ceph/main   |
            \----------/                            \-------------/
                 ^                                    |
                 |                                    | git branch fix_1
@@ -76,7 +78,7 @@ The procedure for making changes to the Ceph repository is as follows:
 
 #. Fix the bug
 
-   #. :ref:`Synchronize local master with upstream master<synchronizing>`.
+   #. :ref:`Synchronize local main with upstream main<synchronizing>`.
          
    #. :ref:`Create a bugfix branch<bugfix_branch>` in your local working copy.
          
@@ -142,6 +144,10 @@ to work on the Ceph repository.".
 
 1. Configure your local git environment with your name and email address.  
 
+   .. note::
+      These commands will work only from within the ``ceph/`` directory
+      that was created when you cloned your fork.
+
    .. prompt:: bash $
 
       git config user.name "FIRST_NAME LAST_NAME"
@@ -163,23 +169,23 @@ Fixing the Bug
 
 .. _synchronizing:
 
-Synchronizing Local Master with Upstream Master
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Synchronizing Local Main with Upstream Main
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-In your local git environment, there is a copy of the ``master`` branch in
-``remotes/origin/master``. This is called "local master". This copy of the
-master branch (https://github.com/your_github_id/ceph.git) is "frozen in time"
+In your local git environment, there is a copy of the ``main`` branch in
+``remotes/origin/main``. This is called "local main". This copy of the
+main branch (https://github.com/your_github_id/ceph.git) is "frozen in time"
 at the moment that you cloned it, but the upstream repo
 (https://github.com/ceph/ceph.git, typically abbreviated to ``ceph/ceph.git``)
 that it was forked from is not frozen in time: the upstream repo is still being
 updated by other contributors. 
 
-Because upstream master is continually receiving updates from other
+Because upstream main is continually receiving updates from other
 contributors, your fork will drift farther and farther from the state of the
 upstream repo when you cloned it.
 
-You must keep your fork's master branch synchronized with upstream master in
-order to reduce drift between your fork's master branch and the upstream master
+You must keep your fork's main branch synchronized with upstream main in
+order to reduce drift between your fork's main branch and the upstream main
 branch.
 
 Here are the commands for keeping your fork synchronized with the
@@ -188,12 +194,12 @@ upstream repository:
 .. prompt:: bash $
 
    git fetch ceph
-   git checkout master
-   git reset --hard ceph/master
-   git push -u origin master
+   git checkout main 
+   git reset --hard ceph/main
+   git push -u origin main
 
-This procedure should be followed often, in order to keep your local ``master``
-in sync with upstream ``master``.
+This procedure should be followed often, in order to keep your local ``main``
+in sync with upstream ``main``.
 
 .. _bugfix_branch:
 
@@ -204,12 +210,12 @@ Create a branch for your bugfix:
 
 .. prompt:: bash $
 
-   git checkout master
+   git checkout main 
    git checkout -b fix_1
    git push -u origin fix_1
 
-The first command (git checkout master) makes sure that the bugfix branch
-"fix_1" is created from the most recent state of the master branch of the
+The first command (git checkout main) makes sure that the bugfix branch
+"fix_1" is created from the most recent state of the main branch of the
 upstream repository. 
 
 The second command (git checkout -b fix_1) creates a "bugfix branch" called
@@ -319,7 +325,7 @@ the `Git Commit Good Practice`_ article at the `OpenStack Project Wiki`_.
 .. _`OpenStack Project Wiki`: https://wiki.openstack.org/wiki/Main_Page
 
 See also our own `Submitting Patches
-<https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst>`_ document.
+<https://github.com/ceph/ceph/blob/main/SubmittingPatches.rst>`_ document.
 
 After your pull request (PR) has been opened, update the :ref:`issue-tracker`
 by adding a comment directing other contributors to your PR. The comment can be
@@ -388,7 +394,7 @@ see how it behaves on real clusters running on physical or virtual
 hardware. Tests designed for this purpose live in the `ceph/qa
 sub-directory`_ and are run via the `teuthology framework`_.
 
-.. _`ceph/qa sub-directory`: https://github.com/ceph/ceph/tree/master/qa/
+.. _`ceph/qa sub-directory`: https://github.com/ceph/ceph/tree/main/qa/
 .. _`teuthology repository`: https://github.com/ceph/teuthology
 .. _`teuthology framework`: https://github.com/ceph/teuthology
 
@@ -437,7 +443,7 @@ will need to force push your branch with:
    git push --force origin fix_1
 
 Why do we take these extra steps instead of simply adding additional commits
-the the PR?  It is best practice for a PR to consist of a single commit; this
+the PR?  It is best practice for a PR to consist of a single commit; this
 makes for clean history, eases peer review of your changes, and facilitates
 merges.  In rare circumstances it also makes it easier to cleanly revert
 changes.
@@ -496,7 +502,7 @@ Another method of generating merge commits involves using Patrick Donnelly's
 **/ceph/src/script/ptl-tool.py**.  Merge commits that have been generated by
 the **ptl-tool** have the following form::
 
-     Merge PR #36257 into master
+     Merge PR #36257 into main 
      * refs/pull/36257/head:
              client: move client_lock to _unmount()
              client: add timer_lock support