domain.py patch

Michael Wood esiotrot at gmail.com
Fri Apr 20 03:15:52 MDT 2012


Hi

On 20 April 2012 10:45, Daniele Dario <d.dario76 at gmail.com> wrote:
> Hi Michael,
> today I applied a patch from Amitay to solve problems on
> samba_upgradedns.
>
> If I try to run "git rebase origin/master" it tells me to commit or
> stash them: how should I proceed?
> I've seen that stash is used to save a local copy of the work but don't
> know if it could cause problems.

Either do this:

git commit -a -m "Patch from Amitay"
git rebase origin/master

This applies Amitay's patch as if you had written and committed it.
This way you will still have Amitay's patch in your local repository
at the end, and therefore your commit IDs will still not match up with
the official repository.  Also the next time you pull it will do a
merge.  If Amitay's patch is committed to the official repository, you
could be able to do another rebase to get the official version, but if
a modified patch ends up in the official repository then the rebase
might cause conflicts or something.  So when you're finished testing
Amitay's patch you might want to do something like "git reset --hard
origin/master" to reset your master branch to be the same as
origin/master.

or:

git stash save
git rebase origin/master
git stash apply
git stash drop

This saves the patch and un-applies it from your working copy of the
files, then does the rebase, then re-applies the patch and removes the
stashed copy of the patch.

You can use "git stash list" to see a list of the stashed patches.
You will have nothing by default.  After git stash save you will see
one patch there.  After git stash apply, there will still be one patch
listed by git stash list.  After git stash drop there will again be
nothing.

I hope that explains things clearly enough and doesn't cause more confusion :)

-- 
Michael Wood <esiotrot at gmail.com>


More information about the samba-technical mailing list