[Sugar-devel] git problems (reprise)

Walter Bender walter.bender at gmail.com
Tue Dec 28 16:49:25 EST 2010


On Tue, Dec 28, 2010 at 3:47 PM, Art Hunkins <abhunkin at uncg.edu> wrote:

> James,
>
> Thanks for your wonderful, clear and understandable instructions. They work
> wonderfully and all my problems are gone.
>
> BTW, your procedure is *much* more user-friendly (and simpler) than any of
> the git material on the wiki. It would really be helpful to have your easy
> step-by-step available online: perhaps one procedure for initial commit, and
> one for followups (like for my case). Of all the challenges I've faced with
> Linux/Sugar, perhaps gitorious has been the greatest and most frustrating.
>

Can you tell me where in the wiki you were finding confusing instructions so
we can update them?

-walter


>
> Please advise me on one point: once the local repo is established
> (filemix.git), what's the simplest way to copy all my (revised) activity
> files (including subdirectory) to filemix.git? When preparing a new push,
> I've often forgotten just which files I've modified, and don't wish to omit
> any (and so would use git add . for the following step). Let's say that the
> source files were in FileMix.activity and that both FileMix.activity and
> filemix.git were in the Activities folder.
>
> Once again, many thanks.
>
> Art Hunkins
>
> ----- Original Message ----- From: "James Cameron" <quozl at laptop.org>
> To: "Art Hunkins" <abhunkin at uncg.edu>
> Cc: <Sugar-devel at lists.sugarlabs.org>
> Sent: Monday, December 27, 2010 11:09 PM
> Subject: Re: [Sugar-devel] git problems (reprise)
>
>
>
>  On Mon, Dec 27, 2010 at 10:27:26PM -0500, Art Hunkins wrote:
>>
>>> then:
>>> git init
>>>
>>
>> This is where you went wrong.  You've created an entirely new repository
>> instead of cloning the existing one.
>>
>>  git add <the three changed files - as listed below>
>>> git status
>>> <everything looks good>
>>>
>>> the console output then picks up and tells the rest of the story:
>>>
>>> [liveuser at localhost FileMix.activity]$ git commit -a -m"Version 4
>>> changes: ObjectChooser and Sugar-version ID reworked"
>>> [master (root-commit) 3b7e345] Version 4 changes: ObjectChooser and
>>> Sugar-version ID reworked
>>> 3 files changed, 494 insertions(+), 0 deletions(-)
>>> create mode 100755 FileMixReadMe.txt
>>> create mode 100755 activity/activity.info
>>> create mode 100755 filemix.py
>>> [liveuser at localhost FileMix.activity]$ git push
>>> gitorious at git.sugarlabs.org:filemix/mainline.git
>>> To gitorious at git.sugarlabs.org:filemix/mainline.git
>>> ! [rejected]        master -> master (non-fast-forward)
>>> error: failed to push some refs to
>>> 'gitorious at git.sugarlabs.org:filemix/mainline.git'
>>> To prevent you from losing history, non-fast-forward updates were
>>> rejected
>>> Merge the remote changes before pushing again.  See the
>>> 'non-fast-forward'
>>> section of 'git push --help' for details.
>>>
>>
>> As you guess, the push is where the problem happened.  The cause
>> of this error is that you are trying to push from a repository that
>> doesn't have the same history of change.  This is because your new local
>> repository is totally unrelated to the remote repository.  It is
>> unrelated because it was created with "git init" instead of "git clone".
>>
>> You might do one of these things:
>>
>> 1.  clone into a new directory, copy those changed files into it,
>> commit, and push again,
>>
>> 2.  understand the difference between the history of your local
>> repository and the remote repository, and adjust it somehow, such as
>> with a merge before a push.
>>
>> I recommend (1) above.  I don't recommend (2), although it is possible,
>> it is not necessary.
>>
>> I'm happy to try to help you through this, and I've cloned the
>> repository git://git.sugarlabs.org/filemix/mainline.git so that I can be
>> prepared to answer questions.
>>
>> Expanding on (1) above:
>>
>> git clone gitorious at git.sugarlabs.org:filemix/mainline.git filemix.git
>> cd filemix.git
>> cp ${THOSE_FILES} .
>> git add FileMixReadMe.txt activity/activity.info filemix.py
>> git commit -m 'Version 4 changes: ObjectChooser and Sugar-version ID
>> reworked'
>> git push
>>
>> --
>> James Cameron
>> http://quozl.linux.org.au/
>>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101228/2f34fd6d/attachment-0001.html>


More information about the Sugar-devel mailing list