X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=pep-103.txt;h=07831041b88393f091a25f68abfbba7372f3c348;hb=fc844705b7c145d77a60baea7210c26f06cae76a;hp=ab2c351ec6f580145276637032aa0562bfccc079;hpb=9f770b7460201b720340528999ecbe347a06601d;p=git-wiki.git diff --git a/pep-103.txt b/pep-103.txt index ab2c351..0783104 100644 --- a/pep-103.txt +++ b/pep-103.txt @@ -638,6 +638,18 @@ The topic branch is deleted to avoid cluttering branch namespace with small topic branches. Information on what issue was fixed or what feature was implemented should be in the commit messages. +But even that small amount of rebasing could be too big in case of +long-lived merged branches. Imagine you're doing work in both ``v1`` +and ``master`` branches, regularly merging ``v1`` into ``master``. +After some time you will have a lot of merge and non-merge commits in +``master``. Then you want to push your finished work to a shared +repository and find someone has pushed a few commits to ``v1``. Now +you have a choice of two equally bad alternatives: either you fetch +and rebase ``v1`` and then have to recreate all you work in ``master`` +(reset ``master`` to the origin, merge ``v1`` and cherry-pick all +non-merge commits from the old master); or merge the new ``v1`` and +loose the beauty of linear history. + Null-merges =========== @@ -763,7 +775,7 @@ working tree:: $ git config rerere.autoupdate true You don't need to turn rerere on globally - you don't want rerere in -bare repositories or single-branche repositories; you only need rerere +bare repositories or single-branch repositories; you only need rerere in repos where you often perform merges and resolve merge conflicts. See `Rerere `_ in The @@ -834,12 +846,12 @@ but you can use your editor:: BTW, if git is instructed to use ``less`` as the pager (i.e., if pager is not configured in git at all it uses ``less`` by default, or if it gets ``less`` from GIT_PAGER or PAGER environment variables, or if it -was configured with ``git config --global core.pager less``, or +was configured with ``git config [--global] core.pager less``, or ``less`` is used in the command ``git grep -Oless``) ``git grep`` passes ``+/$pattern`` option to ``less`` which is quite convenient. Unfortunately, ``git grep`` doesn't pass the pattern if the pager is not exactly ``less``, even if it's ``less`` with parameters (something -like ``git config --global core.pager less -FRSXgimq``); fortunately, +like ``git config [--global] core.pager less -FRSXgimq``); fortunately, ``git grep -Oless`` always passes the pattern.