Git a headache

ErlendErlend Posts: 605
edited 2020-02-09 - 12:21:41 in General Discussion
Once in a while I make a piece of code that I believe is worth sharing. With OBEX that was easy. Is there an easy way with Github? - I get a headache every time I try to find one. Do I have to write a number of cryptic commands, or can I somehow just click 'upload'?
I am sure there are many like me - who are not professional coders who use configuration control on a daily basis.

Erlend
«1

Comments

  • In reading through Parallax’s article on the github, you can email the object to propeller+github@parallax.com

    Here is the article.
  • And what brought you to that conclusion? Sadly the tool does not have a well written series of instructions. Which isn't the fault of Parallax. It's the fault of the people who wrote the original.
  • Attaching a ZIP file to a mail is too complicated?
  • No, but the first method definitely is.
    I've emailed github before about their terminology.
    They emailed me back about being sorry how github doesn't fit my "workflow".
    Yet again I'm left confused.
  • msrobotsmsrobots Posts: 3,101
    edited 2020-02-10 - 08:14:57
    yeti wrote: »
    Attaching a ZIP file to a mail is too complicated?

    well if nobody at parallax cares about them mails it is frustrating. I did send in FullDuplexSerial2.Spin2 some month(ssss) ago, but nobody cares.

    Not that it doesn't work, even @RossH uses it with Catalina, but - hmm - nobody cares.

    Mike
  • I don't know if Parallax ha some dedicated workflow, however, since the repository is on Github, you can fork the Parallax repository to your own account, upload your files and issue a pull-request to the original repository. If Parallax accepts your changes all is well, if not, your files are still available on your repository.

    Github has a number of documents explaining the details of this workflow, some starting points:

    https://help.github.com/en/github/getting-started-with-github/fork-a-repo
    https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork
    Erlend wrote: »
    Do I have to write a number of cryptic commands, or can I somehow just click 'upload'?

    There are a number of tools that integrate git into a nice windowed interface, https://desktop.github.com/ is one of those (never used), others are listed here https://git-scm.com/download/gui/windows. I prefer to use the command line, it allows to know what you are doing, not very difficult to learn, at least not more difficult than any other tool you learned to use.
  • @msrobots a middle way between fork'n'PR and mail-a-ZIP could be to open an issue at https://github.com/parallaxinc/propeller/issues to write some nice lines and attach the ZIP there. That way readers could get the ZIP and some information even before it is "manually merged" and some may find attaching a ZIP to an issue even easier than to a mail.

    Maybe some official can beam in here and comment it?
    Or beter discuss this workflow idea in an issue?
    Now that would be consequent! \o/
  • I just cannot understand why all the obvious easy ways nowadays available are not an option for using github - for those of us who do not love command line interfaces?
    Anyway, everything I consider worth sharing I will upload to https://github.com/ErlendFj It is fairly easy. But when I looked at the recipe for forking the Parallax repository and all the subsequent commands required, I stopped there. My energy will be better spent elsewhere.

    Erlend
  • Erlend wrote: »
    I just cannot understand why all the obvious easy ways nowadays available are not an option for using github - for those of us who do not love command line interfaces?
    Anyway, everything I consider worth sharing I will upload to https://github.com/ErlendFj It is fairly easy. But when I looked at the recipe for forking the Parallax repository and all the subsequent commands required, I stopped there. My energy will be better spent elsewhere.

    Erlend
    I agree with you. There seem to be easy ways to manage a single repository but no one seems to have come up with an easy way to handle pull requests.

  • What was the underlying reason that Parallax shut down the OBEX?
  • I also have some code I would like to share from time to time, but github seems too complicated, and I do not have time to waste on that, which I think is a shame, and im affraid other people also skip sharing.
  • JRoark wrote: »
    What was the underlying reason that Parallax shut down the OBEX?

    Requests out of this forum to integrate all existing git based projects under the parallax umbrella. The plan was to move the OBEX to git while adding P2 to P1 and Stamps and adding more language selections.

    That plan included to build (find?) some user friendly Website to replace the current OBEX based on that underlying Parallax git account.

    Sadly that plan was not followed up, my guess is that Parallax currently lacks the manpower to do so. The OBEX itself was basically user driven and did not need much involvement from Parallax, the current git account needs someone to maintain it and react to pull requests and the alternative email offer.

    I am quite confident that Parallax will solve that, given some time and cash, but basically that is said about PropGCC too.

    But compared to the launch of the P1, the launch of the P2 can start from some solid ground already. Sure the documentation is sparse and spread wide over this forum. But one thing is sure, Documentation is something Parallax is good at and the have the man and woman power inhouse.

    My personal guess is that Ken did not expect the P2 to finish that soon...

    Enjoy!

    Mike
  • Cluso99Cluso99 Posts: 15,842
    edited 2020-02-11 - 12:52:59
    GIT is such an amazing advance!

    It’s so complex you need a degree to understand and use it. And it replaces those such old systems like OBEX that anyone could use.

    That’s progress :(
    Reminds me of C compared to Basic and Pascal.
  • Just start using it!

    https://xkcd.com/1597/

    If you trash your local fork, throw it away and restart.
    It's like learning to walk or to drive a bicycle.

    I'm very ॐptimitic that you can do it!

    If you just don't want to, attach ZIPs to mails or issues then.

    To the ones using the fork/PR method: Please take some notes on how to improve the hints when preparing stuff, especially about having the PR in a separate local branch.

    After a while this will give a cheat sheet with a robust strategy which will only need to remove a local branch on failure instead of restarting with a complete fresh clone after each problem.

    aTdHvAaNnKcSe!
  • Cluso99 wrote: »
    GIT is such an amazing advance!

    It’s so complex you need a degree to understand and use it. And it replaces those such old systems like OBEX that anyone could use.

    That’s progress :(
    Reminds me of C compared to Basic and Pascal.

    I have to agree.
    I consider myself a pretty smart guy, and I can't figure out git either.

    I haven't tried recently, so maybe they have made it easier.

    Bean
  • yetiyeti Posts: 644
    edited 2020-02-12 - 13:19:15
    Stop that git bashing!
    You're just lazy and seeking excuses!

    I'm not a genius and I can use git without too much damage most of the time. Doing some harm to a branch or clone is no big deal, just branch or clone anew and retry!
    Edit:
    "You" is plural in this message.
  • TorTor Posts: 1,992
    Read "git from the bottom up"(google it), try the examples. This is to understand the basics of how Git works, and that makes the rest of the process easier. (The examples are not how you use git in day-to-day work, but the show the concept Git is built on.)
  • I think I've said it before somewhere, but if you're having trouble with git (and are using Windows...), I can recommend TortoiseGit as a GUI for git. Makes the most used commands really simple without trying to hide the underlying concepts.
  • Tor wrote: »
    Read "git from the bottom up"(google it), try the examples. This is to understand the basics of how Git works, and that makes the rest of the process easier. (The examples are not how you use git in day-to-day work, but the show the concept Git is built on.)
    Thanks for the article reference.

    After reading a number of pages I gave up!
    Why?
    * Well it doesn’t in any way serve my needs.
    * I don’t need any complex way to store my code files so that others may download them and do with them whatever they want.
    * I maintain my own history of changes to files - I’ve been doing this for almost 50 years. I have incremental backups which can if necessary prove that I wrote my code as it shows the progression of code.
    * I can if necessary do a diff to see what changes have been made between code revisions

    While bit may serve multiple users in a development environment (we may well use gift at work for some of our software development and releases), my work is in isolation. I have no use for anything complex, and hence no desire to learn a bunch of complicated commands (that btw went out of fashion in the 90’s when Mac and Windows removed the need to understand such commands).

    What I see as the users of my code, and for that matter, most users of code for P1 and/or P2, they desire/require somewhere where they can download those files in a simple fashion without the need to learn something complex in order to do something as simple as download a file(s).
    IMHO OBEX did this.
    GIT does not!

    BTW It is not that I’m incapable of understanding GIT. It’s that I have no need. If it’s too complicated, then you can either get my code from this forum (since we no longer have OBEX), or you can go without it - it’s really that simple. I have many things to do with my little spare time, and learning GIT is not one of them, at least at this time, and I’m certainly not going to force it on anyone who wants to see/use my code.

    I guess it’s the same as why I don’t bother with learning *nix. As much as I hate Windoze, it’s easy to use, and does what I need.

    FWIW, I program in python for more than 80% of my work week.
  • yeti wrote: »
    Just start using it!

    https://xkcd.com/1597/

    If you trash your local fork, throw it away and restart.
    It's like learning to walk or to drive a bicycle.

    I'm very ॐptimitic that you can do it!

    If you just don't want to, attach ZIPs to mails or issues then.

    To the ones using the fork/PR method: Please take some notes on how to improve the hints when preparing stuff, especially about having the PR in a separate local branch.

    After a while this will give a cheat sheet with a robust strategy which will only need to remove a local branch on failure instead of restarting with a complete fresh clone after each problem.

    aTdHvAaNnKcSe!

    You forgot the i, but you're welcome anyway;-)
  • I have to add my 2 cents that going to Git is a giant step in the wrong direction. The whole point of the Obex was that n00bs could check it out and download things that might teach them something or prove useful to them. This worked especially well when the development was all in PropTool and its compatible export files. C complicated that, because people wanting something like a video or I2C driver now had to sort past the source language. The Git thing is simply unworkable. You cannot expect n00bs to do that.

    Forget the upload problem. Yeah we can email it to you. How do you expect someone who is barely conversant in microcontrollers to DOWNload it? It's not at all obvious how, and if you expect them to sit through the how-to YouTube video that's very unrealistic.

    I find it very strange that something like the Obex is so hard to implement. It's basically another form of discussion board, focused on attachments instead of commentary. I could probably spin up something on NearlyFreeSpeech in a few days to do the essential functionality. (Actually maybe not that quick for me, but a lot faster for some other people.) Git is a very specialized tool for large groups of developers who need to sync the contributions of dozens or hundreds of programmers working on a single project. It's completely inappropriate for introducing n00bs to the basic programming techniques of your unique and wonderful device.
  • kwinn wrote: »
    You forgot the i, but you're welcome anyway;-)
    Ok, here is the "I":
    I use git.
  • localroger wrote: »
    I have to add my 2 cents that going to Git is a giant step in the wrong direction. The whole point of the Obex was that n00bs could check it out and download things that might teach them something or prove useful to them. This worked especially well when the development was all in PropTool and its compatible export files. C complicated that, because people wanting something like a video or I2C driver now had to sort past the source language. The Git thing is simply unworkable. You cannot expect n00bs to do that.

    Forget the upload problem. Yeah we can email it to you. How do you expect someone who is barely conversant in microcontrollers to DOWNload it? It's not at all obvious how, and if you expect them to sit through the how-to YouTube video that's very unrealistic.

    I find it very strange that something like the Obex is so hard to implement. It's basically another form of discussion board, focused on attachments instead of commentary. I could probably spin up something on NearlyFreeSpeech in a few days to do the essential functionality. (Actually maybe not that quick for me, but a lot faster for some other people.) Git is a very specialized tool for large groups of developers who need to sync the contributions of dozens or hundreds of programmers working on a single project. It's completely inappropriate for introducing n00bs to the basic programming techniques of your unique and wonderful device.

    Why couldn't another Forum be set up just for code? - the "OBEX Forum"

    There would be a thread for each piece of code, with the first post housing a link to the latest code. Discussion for that piece of code would reside within the thread.

    Categories could be setup for P2ASM, SPIN2, C, Micropython, Tools, etc.

    Just a thought?
  • yetiyeti Posts: 644
    edited 2020-02-13 - 07:23:59
    Why couldn't another Forum be set up just for code? - the "OBEX Forum"
    That would need wiki like access to at least the top post.

    There was a Propeller Wiki (which died) and there is a Propeller Wiki (reanimated and ignored).
    Use this instead.
  • localroger wrote: »
    Forget the upload problem. Yeah we can email it to you. How do you expect someone who is barely conversant in microcontrollers to DOWNload it? It's not at all obvious how, and if you expect them to sit through the how-to YouTube video that's very unrealistic.

    Nothing prevents Parallax or anyone else to put files readily available for downloads. If you look at the Github repository there is a "Release" tab where files can be downloaded in a single step, without worrying about the "complex, cumbersome, cryptic, woodoo, mumbo-jumbo" git command line syntax.

    Git is about keeping track of source changes and allow collaboration.
  • Wuerfel_21 wrote: »
    I think I've said it before somewhere, but if you're having trouble with git (and are using Windows...), I can recommend TortoiseGit as a GUI for git. Makes the most used commands really simple without trying to hide the underlying concepts.

    Thanks, I installed it, but it seems to me that it only helps _after_ having understood the whole Git thing and using/needing the configuration control functionality - which I don't. But, now I've figured out the work streams 'create repository - upload, commit' and 'fork, upload, merge, delete', and that I can do through the git web interface. As close as I can get to an Obex experience. Unfortunately, I can only do that inside my own git account, though.
  • Erlend wrote: »
    Unfortunately, I can only do that inside my own git account, though.

    Well, think if you can do those things on someone else's repository... what a mess would be!

    That's where pull-requests came into action. You can fork anyone else's repository and use it like it is yours (it is effectively yours because it is a copy of the original), upload your changes and submit pull-requests so the original author can review and merge your sources, keeping the history, etc.

  • macca wrote: »
    localroger wrote: »
    Forget the upload problem. Yeah we can email it to you. How do you expect someone who is barely conversant in microcontrollers to DOWNload it? It's not at all obvious how, and if you expect them to sit through the how-to YouTube video that's very unrealistic.

    Nothing prevents Parallax or anyone else to put files readily available for downloads. If you look at the Github repository there is a "Release" tab where files can be downloaded in a single step, without worrying about the "complex, cumbersome, cryptic, woodoo, mumbo-jumbo" git command line syntax.

    Git is about keeping track of source changes and allow collaboration.

    Being a n00b I am looking for a button or link that says DOWNLOAD. I expect it to download a zip file containing everything necessary to build the project, which is exactly what the PropTool exports for that purpose. That file has probably been created and uploaded in a single step by a contributor who made it to publish and demonstrate something cool. The collaboration tools are not helpful and how am I supposed to know that RELEASE leads to the download function. Making useful functions available to people who do not have the skill to build those functions themselves is the single most important function of the OBEX, and Git is absolutely terrible for that.
  • David BetzDavid Betz Posts: 13,723
    edited 2020-02-13 - 14:24:26
    What if the old OBEX interface was revived but only used for downloading objects? There could be some automatic process setup to export stuff from GitHub into OBEX at regular intervals. You'd still have to submit new objects and update existing objects through GitHub though. At least that would make it easy to use OBEX objects though.
  • David Betz wrote: »
    There could be some automatic process setup to export stuff from GitHub into OBEX at regular intervals.
    GitHub has webhooks, so you can actually just use those to trigger an export whenever something changes.
Sign In or Register to comment.