Was looking through some notes I took while reading Pro git book and had
the following written down...not sure if it’s of help but figured I’d pass
on just in case...

———

The difference between merges and rebase involved the history and how the
changes are applied.

In this case a patch[delta] for a change in one Branch and reapply onto
another branch

$ git checkout experiment
$ git rebase master

The above goes to experiment branch and reapplies changes into the master
branch.  Still on experiment branch
Then can change to master and fast forward merge with
$ git checkout master
$ git merge experiment

With rebase the history shows more sequential (straight line) as opposed to
the parallel with a pure merge case

When working separate branches  it’s good to rebase from the origin/master
before submitting patches

Merging takes endpoints and merges;rebase reapplies changes from one to the
other

Rebase —onto allows reapplying on to a specified branch different from
another

git rebase <basebranch> <topicbranch>

git pull —rebase
Recommend to many minimize confusion due to potential conflicting similar
changes

“If you are using git pull and want to make--rebase the default, you can
set the pull.rebase config value with something like git config--global
pull.rebase true.”



On Wed, Nov 20, 2019 at 6:33 PM Jesse Glick <typr...@gmail.com> wrote:

> On Tue, Nov 19, 2019 at 12:53 AM Laszlo Kishalmi
> <laszlo.kisha...@gmail.com> wrote:
> > I would like to defend the squashed commits.
> > It is much easier to handle cherry-picks and other merges for PR-s
>
> Since the above is a commonly expressed justification for destructive
> history operations:
>
> git cherry-pick -x -m1 <the-PR-merge-commit>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: dev-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
> --
Eric Bresie
ebre...@gmail.com

Reply via email to