[Phpmyadmin-devel] Git repo update

Marc Delisle marc at infomarc.info
Wed May 2 18:13:53 CEST 2012


Le 2012-05-02 10:47, Atul Pratap Singh a écrit :
> On Wed, May 2, 2012 at 8:08 PM, Marc Delisle <marc at infomarc.info> wrote:
> 
>> Le 2012-05-02 10:32, Thilina Buddika Abeyrathna a écrit :
>>> On Wed, May 2, 2012 at 7:59 PM, Marc Delisle <marc at infomarc.info> wrote:
>>>
>>>> Le 2012-05-02 10:21, Thilina Buddika Abeyrathna a écrit :
>>>>> On Wed, May 2, 2012 at 7:38 PM, Marc Delisle <marc at infomarc.info>
>> wrote:
>>>>>
>>>>>> Le 2012-05-02 10:04, Thilina Buddika Abeyrathna a écrit :
>>>>>>> On Wed, May 2, 2012 at 7:07 PM, Thilina Buddika Abeyrathna <
>>>>>>> thilinaabeyrathna at gmail.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, May 2, 2012 at 7:00 PM, Alex Marin <alex.ukf at gmail.com>
>>>> wrote:
>>>>>>>>
>>>>>>>>> On Wed, May 2, 2012 at 4:09 PM, Thilina Buddika Abeyrathna
>>>>>>>>> <thilinaabeyrathna at gmail.com> wrote:
>>>>>>>>>> Hi Marc,
>>>>>>>>>> I used following command to update my git repo in GitHub.
>>>>>>>>>>
>>>>>>>>>> git remote add upstream git://github.com/thilinaa/phpmyadmin.git
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> git fetch upstream
>>>>>>>>>>
>>>>>>>>>> But it did not work for my repo. Please give me some suggestions.
>>>>>>>>>
>>>>>>>>> Hi Thilina,
>>>>>>>>>
>>>>>>>>> Your command adds your fork of phpmyadmin as a remote repo. I
>>>>>>>>> assume you want to get the latest changes from the phpmyadmin
>>>>>>>>> official repo. So you first have to add the remote phpmyadmin repo:
>>>>>>>>>   git remote add upstream git://
>> github.com/phpmyadmin/phpmyadmin.git
>>>>>>>>> For getting the latest updates from there, you should use:
>>>>>>>>>  git pull upstream [branch] (or git fetch as you mentioned).
>>>>>>>>>
>>>>>>>>> And finally, if you want to push the changes to your fork, then you
>>>>>> first
>>>>>>>>> have to create your fork and add it as a remote repo:
>>>>>>>>>   git remote add origin git://github.com/thilinaa/phpmyadmin.git
>>>>>>>>> Then, you push with
>>>>>>>>>   git push origin [branch]
>>>>>>>>>
>>>>>>>>> You can also find more details at [0] and [1].
>>>>>>>>>
>>>>>>>>> [0] http://help.github.com/fork-a-repo/
>>>>>>>>> [1] http://help.github.com/remotes/
>>>>>>>>>
>>>>>>>>> All the best,
>>>>>>>>> Alex
>>>>>>>>>
>>>>>>>>> Hi Alex,
>>>>>>>> Thank you very much.
>>>>>>>
>>>>>>>
>>>>>>> Alex,
>>>>>>> I did what you asked to do. But still my fork not up to date.
>>>>>>
>>>>>> Thilina,
>>>>>> how did you create your local repository in the first place?
>>>>>>
>>>>>> using 'git clone'
>>>>
>>>> Please show us the output of
>>>>
>>>> git remote -v show
>>>>
>>>> origin    git://github.com/thilinaa/phpmyadmin.git (fetch)
>>> origin    git://github.com/thilinaa/phpmyadmin.git (push)
>>> upstream    git://github.com/phpmyadmin/phpmyadmin.git (fetch)
>>> upstream    git://github.com/phpmyadmin/phpmyadmin.git (push)
>>
>> Ok, try this:
>>
>> git remote rm upstream
>> git remote add upstream https://github.com/phpmyadmin/phpmyadmin.git
>> git remote update upstream
>>
>> Then, to sync from upstream:
>>
>> git checkout origin/master
>> git merge upstream/master
>>
>>
>>
> HI Marc,
> I think the problem may be that the remote repo 'origin' ( git://
> github.com/thilinaa/phpmyadmin.git ) is read-only and must be replaced with
> git at github.com:thilinaa/phpmyadmin.git to enable push access.

Hi Atul,
I agree with your suggestion, but now that Thilina has local changes,
I'm not sure how he can keep them. Maybe by doing this prior to removing
his origin repository

git diff > /someotherpath/localchanges.diff

> 
> git remote rm origin
> git remote add origin "git at github.com:thilinaa/phpmyadmin.git"
> git fetch upstream
> git merge upstream/master
> git push origin
> 
> Thilina, please check that you have added your SSH public key to github
> allowed keys list in your account.

-- 
Marc Delisle
http://infomarc.info




More information about the Developers mailing list