Conversation
jklymak
left a comment
There was a problem hiding this comment.
Some suggested tightening. "Make commits inaccessible by leaving no reference..." is maybe conceptually different than "discarding commits" in some way I don't understand, but I don't think it's actually different?
Co-authored-by: Jody Klymak <[email protected]>
Co-authored-by: Oscar Gustafsson <[email protected]>
| ``--force`` will do the push no matter what, whereas ``--force-with-lease`` | ||
| will only do the push if the remote branch is where the local ``git`` client | ||
| thought it was. | ||
|
|
There was a problem hiding this comment.
| 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
There was a problem hiding this comment.
I see what you mean, working on it.
There was a problem hiding this comment.
Totally optional - I was about to merge, but thought it would be nice to the back to the example.
Co-authored-by: Jody Klymak <[email protected]>
jklymak
left a comment
There was a problem hiding this comment.
I think we should merge.
It would be nice if there were an open-source definitive guide to git that we could just reference for all this stuff instead. gitwash was an attempt at that, but the 5 or so git commands I actually use were buried in pages of esoterica. It seems a numfocus or scipy opinionated guide to the general git/github development flow that we could all just reference would be good. We have one, xarray has a pretty good one, there are probably others. But there is nothing in here that is unique to Matplotlib.
melissawm
left a comment
There was a problem hiding this comment.
This looks good to me, thanks @tacaswell ! One thing that may be worth linking to, but could be on a follow up, is some documentation on reflog. I've found not a lot of people know about it and it can be really helpful when trying to understand what happened or in what state the repo is.
PR Summary
Twice this week I have written out an explanation of force-pushing so I wrote it up for the docs.
There is some minor re-arrangement of the sub-sections that I thought made more sense, but I would drop the first two commits with no argument if people prefer the old order.