Comment #14 on issue 2217 by [email protected]: Patches tutorial
http://code.google.com/p/sympy/issues/detail?id=2217

I want to consult about the problems with synchronizations.

This is a frequent situation, when branch is out of date with sympy/sympy repository.
So after clarification, I am going to add it at our guide.

Consider this example:

    $ git remote -v
    github [email protected]:sherjilozair/sympy.git (fetch)
    github [email protected]:sherjilozair/sympy.git (push)
    origin https://github.com/sympy/sympy.git (fetch)
    origin https://github.com/sympy/sympy.git (push)

Suppose that on local git repository we have this commits in master branch:

    A---B---C        master

Then we have divergent branch `cholesky`:


    A---B---C           master
             \
              a---b     cholesky

In the meantime the remote `sympy/sympy` master repository was updated.

    A---B---C---D       origin/master

The final aim, that I want to obtain is:

    A---B---C---D           master
                 \
                  a---b     cholesky


Further is my solution, but I am not specialist and I am not sure.

First of all synchronize your `master` with origin.
(you can preact every command by checking `git log`)

    $ git checkout master
    $ git pull

    A---B---C---D       master
             \
              a---b     cholesky

Then merge your `cholesky` branch from `master`:

    $ git checkout cholesky
    $ git merge master

Probably the last command will tell you that conflicts are must be solved for a few indicated files.

if that's the case then the marks `HEAD>>>` will appear at those files.
You must manually remove useless pieces, and leave only new changes from your branch.

Then be sure that  all tests pass.
    $ ./bin/test
    $ ./bin/doctest

and commit

    $ git commit -m "Merging with master"

So the result will be like that (automatic merging `c`):

    A---B---C-------D     master
             \       \
              a---b---c   cholesky

But I wanted something else, so I offer:

    $ git checkout cholesky
$ git rebase master # be careful, use this command only in your branch.

And I hope that I obtained what was needed.

    A---B---C---D           master
                 \
                  a---b     cholesky

So the main question, is it correct way?
Or may be the better solution are exist.

Thanks.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to