Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: copy editing
Co-authored-by: Oscar Gustafsson <oscar.gustafsson@gmail.com>
  • Loading branch information
tacaswell and oscargus authored Dec 8, 2022
commit 446eff4942f2c00f51ed0004060305a67edf5aab
6 changes: 3 additions & 3 deletions doc/devel/development_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ while. In the meantime, ``main`` has progressed from commit E to commit (say) G:
D---E---F---G main

At this stage you consider merging ``main`` into your feature branch, and you
remember that this here page sternly advises you not to do that, because the
remember that this page sternly advises you not to do that, because the
history will get messy. Most of the time you can just ask for a review, and not
worry that ``main`` has got a little ahead. But sometimes, the changes in
``main`` might affect your changes, and you need to harmonize them. In this
Expand Down Expand Up @@ -399,14 +399,14 @@ correct course of action (or rebase your local branch but it is a matter of
taste).

However, in the case of having intentionally re-written history we *want* to discard the commits and
replace them with the new-and-improved versions from our local branch. In these cases what we want to do is ::
replace them with the new-and-improved versions from our local branch. In these cases, what we want to do is ::

$ git push --force-with-lease

which tells git you are aware of the risks and want to do the push anyway. We
recommend using ``--force-with-lease`` over the ``--force`` flag. The
``--force`` will do the push no matter what, whereas ``--force-with-lease``
will only do the push of the remote branch is where the local ``git`` client
will only do the push if the remote branch is where the local ``git`` client
thought it was.

@jklymak jklymak Dec 9, 2022 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After the force-push, the tree example will be the same on both the local and ``origin`` branches and the old commits, ``A, B, C``, will be lost (though hopefully squashed into ``A'``):

.. code-block:: none

  D---A'---E cool-feature, origin/cool-feature

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean, working on it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally optional - I was about to merge, but thought it would be nice to the back to the example.

Be judicious with force-pushing. It is effectively re-writing published
Expand Down