[Kmymoney-devel] Git workflow after backporting to origin/4.6
Alvaro Soliverez
asoliverez at kde.org
Sat Jun 30 17:59:26 UTC 2012
On Sat, Jun 30, 2012 at 2:31 PM, Allan <agander93 at gmail.com> wrote:
> 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?
>
In your case kde:kmymoney is the remote repo you are trying to push
to. In my case it's origin. Now you only need to specify the branch
you want to push to. My git config is a little different because I use
many git repos in my daily work.
So, for you it would be:
git push kde:kmymoney 4.6
Regards,
Alvaro
More information about the KMyMoney-devel
mailing list