[Sugar-devel] git problems (reprise)

Art Hunkins abhunkin at uncg.edu
Tue Dec 28 22:16:55 EST 2010


Walter,

My sources of gitorious info were: the Activity Team/Git FAQ, the Activity Team/Git Tutorial, and Importing your project from OLPC.

I found the material disorganized, unnecessarily abstruse and technical, and not at all user-friendly (at least for the beginner).

For the newbee, only the essentials are needed, and clarity of expression and direction are crucial. This, particularly. for those of us whose knowledge of Linux and Sugar is elementary.

Take, for example, the Git Tutorial - which I expected to be the most helpful of the above: three-quarters of the material is nonessential, and the info on creating an account and SSH key are grossly inadequate. Furthermore, there is no treatment of anything but the git *init* procedure - nothing about creating a local depository through pulling from gitorious (my particular issue).

Specifically, the nuts and bolts of a practical, understandable series of steps to accomplish simple objectives are lacking.

Solving these problems by furnishing down-to-earth practical instructions would be of great help. (I also know that this is somewhat of a challenge in an open-source environment, so I don't expect miracles. Often, as in my case, listservs such as this one - and generous souls such as you - are the principal resource for newbees. And thank goodness for yawl (I'm from North Carolina - aka the South).

Art Hunkins

  ----- Original Message ----- 
  From: Walter Bender 
  To: Art Hunkins 
  Cc: James Cameron ; Sugar-devel at lists.sugarlabs.org 
  Sent: Tuesday, December 28, 2010 4:49 PM
  Subject: Re: [Sugar-devel] git problems (reprise)





  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/f5c857a7/attachment.html>


More information about the Sugar-devel mailing list