+.. _basic workflow dev guide:
+
Basic Workflow
==============
Upstream Code Your Local Environment
/----------\ git clone /-------------\
- | Ceph | -------------------------> | ceph/master |
+ | Ceph | -------------------------> | ceph/main |
\----------/ \-------------/
^ |
| | git branch fix_1
#. 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.
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"
.. _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
.. 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:
.. 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
.. _`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
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
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.
**/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