ryenus <rye...@gmail.com> writes:

> The inverted meaning of {ours,theirs} for rebase could be very
> confusing to some, especially to new uses, for me every time I
> merge/rebase I need to think about it to make sure I've made it right.

The key point to remember is "git rebase origin master" is *not*
about integrating other people's changes to your work.  It is a way
to replay your work on top of others' work.

When I try to rebase a topic, e.g.

    git checkout jc/format-patch
    git rebase 8ee3860
    
The conflicts in pretty.c looks like this:

    <<<<<<< HEAD
    static const char *show_ident_date(const struct ident_split *ident,
                                       enum date_mode mode)
    {
    ...
            return show_date(date, tz, mode);
    =======
    static int is_current_user(const struct pretty_print_context *pp,
                               const char *email, size_t emaillen,
                               const char *name, size_t namelen)
    {
    ...
                    !memcmp(myname, name, namelen));
    >>>>>>> format-patch: --inline-single
    }

We are replaying the commits on "jc/format-patch" topic on a history
that leads to 8ee3860, and the line ">>>>>" shows what commit we are
replaying

    $ git log --oneline 8ee3860..jc/format-patch
    be1a07f format-patch: --inline-single
    47d6c5f format-patch: rename "no_inline" field

On the other hand, when I try to do the same integration with a
merge, e.g.

    git checkout 8ee3860
    git merge jc/format-patch

We would see the same conflicts like this:

    <<<<<<< HEAD
    static const char *show_ident_date(const struct ident_split *ident,
                                       enum date_mode mode)
    {
    ...
            return show_date(date, tz, mode);
    =======
    static int is_current_user(const struct pretty_print_context *pp,
                               const char *email, size_t emaillen,
                               const char *name, size_t namelen)
    {
    ...
                    !memcmp(myname, name, namelen));
    >>>>>>> jc/format-patch
    }

Again, the name of the branch that is merged appears on ">>>>>"
line.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to