[Kmymoney-devel] Git workflow after backporting to origin/4.6

Allan agander93 at gmail.com
Sat Jun 30 17:31:31 UTC 2012


On 30/06/12 15:09, Alvaro Soliverez wrote:
> You need to rebase from origin/4.6, not from master. At least, if you
> intend to push that to the 4.6 branch.
>
> Rebase applies your commits on top of the branch you rebase it on. In
> this case, you want to apply your fixes to 4.6, so run git rebase 4.6
>
> What you should do to work on 4.6 fixes would be something like these:
>
> To start:
> git checkout 4.6
> git fetch origin&&  git reset --hard origin/4.6
> git checkout -b backportFixes
> (work on the fixes, cherry-pick from other branches, etc.)
>
> Once you are done with that, and I think the point where you are at now:
> git checkout 4.6
> git pull -r origin 4.6
> git checkout backportFixes
> git rebase 4.6
> git checkout 4.6
> git merge backportFixes
> git push origin 4.6
>
> So, I think your problem at this point is that your worked directly on
> the 4.6 branch.
> git checkout -b a new branch, then follow the last set of steps to
> rebase, merge, and push.
>
> If you don't understand why these steps, please let me know and I'll
> try to clarify.
>
> Regards,
> Alvaro

Hi Alvaro

Obviously I need to get a deeper understanding of git!

I've now completed the merge and now need to do the push.  I would 
normally do "ssh-add ~/.ssh/id_rsa && git push kde:kmymoney".  You show 
"git push origin 4.6".  Just being hyper-careful now, am I right in 
thinking that I just replace "...kde:kmymoney" with "...origin 4.6"?  If 
so, is my "...kde:kmymoney" what I should normally be using?

Thanks again

Allan


> On Sat, Jun 30, 2012 at 10:28 AM, Allan<agander93 at gmail.com>  wrote:
>> On 30/06/12 14:04, Alvaro Soliverez wrote:
>>>
>>> Hello Allan,
>>> Did you intend to push that commit to 4.6 branch now? Because that
>>> message is saying you have a local change that you haven't pushed yet.
>>>
>>> Also, once you're done, you should checkout the master branch and work as
>>> usual.
>>>
>>> git checkout master
>>> git pull -r
>>> ...
>>>
>>> Still, it isn't clear where you are trying to go at this point.
>>>
>>> Regards,
>>> Alvaro
>>
>>
>> Hi Alvaro
>>
>> I'm intending to do the merge and push, but would first do
>> git rebase master
>> and wasn't sure whether that line needed to be edited to reflect origin/4.6,
>> or whether it is referencing just my local master?
>>
>> And then, following the merge and push, I always get the
>> "Your branch is ahead of 'origin/master' by x commits." message which I
>> follow with
>>
>> "git fetch origin&&  git reset --hard origin/master"
>> do I replace origin with "origin/4.6"?
>>
>> Thanks
>>
>> Allan
>>
>>
>>
>>> On Sat, Jun 30, 2012 at 9:48 AM, Allan<agander93 at gmail.com>    wrote:
>>>>
>>>> I have completed the local backporting to origin/4.6, and git status
>>>> shows
>>>> # On branch 4.6
>>>> # Your branch is ahead of 'origin/4.6' by 1 commit.
>>>>
>>>> Normally, I would see this type of message following the merge and push,
>>>> and
>>>> I would then do
>>>> git fetch origin&&    git reset --hard origin/master
>>>>
>>>> but suspect I don't do that in this case.  Am I correct in this?  If so
>>>> exactly what do I need to do to avoid a screw up?
>>>>
>>>> I have done -
>>>> git add
>>>> git commit
>>>> git checkout master
>>>> git pull -r
>>>>
>>>> and would normally then do -
>>>> git rebase master
>>>> ssh-add ~/.ssh/id_rsa&&    git push kde:kmymoney
>>>> git fetch origin&&    git reset --hard origin/master
>>>>
>>>>
>>>> Just need a pointer, please.
>>>>
>>>> Allan
>>>> _______________________________________________
>>>> KMyMoney-devel mailing list
>>>> KMyMoney-devel at kde.org
>>>> https://mail.kde.org/mailman/listinfo/kmymoney-devel
>>>
>>> _______________________________________________
>>> KMyMoney-devel mailing list
>>> KMyMoney-devel at kde.org
>>> https://mail.kde.org/mailman/listinfo/kmymoney-devel
>>>
>> _______________________________________________
>> KMyMoney-devel mailing list
>> KMyMoney-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/kmymoney-devel
>


More information about the KMyMoney-devel mailing list