Perception of Git outside of softdev - Page 1
Forum section: electronics / general

author: golden_labels
author_rank: Super Contributor
timestamp: February 22, 2023, 10:42:57 pm
content: While inspired by EEVblog video, this thread is notaboutthe video.Therefore I put itComputersand not inEEVblog Specific.In the “LIVE HELP with Github/Gitlab” video(youtube:1)Dave experienced some trouble with using GitHub. For technical reasons I only seen the latter half of it: from about where he stated the line must be drawn. Some weird image emerged from that. An image, which makes me think, how people from outside of the softdev world perceive the topics touched there.Topic #1Dave does not himself use Git. Why did someone suggest him to put the project on GitHub? What was the motivation? The goals? To me, as a software developer, this idea sounds absurd. The only thing I could came up with, is the ability to clone or GitHub-fork and maintain the connection with Dave’s version. But I feel this is a far-fetched explanation. The VCS interaction would be almost entirely missing on Dave’s end and, where present, it would require him to put a lot of pointless effort to fit into the workflow. IMO it would be enough to put an archive on eevblog.com and using forum for bug reports and FRs.Topic #2There seemed to be confusion between Git and GitHub, and misunderstanding the purpose of GitHub. I felt as if Dave thought GitHub is either a standalone service offering VCS, or even a file hosting service with bells and whitles. In my life I encountered really outlandish views regarding the areas I myself know: both from talking with people, as reported by friends and from reading research. I wonder, how far it goes with Git and, independently of that, with services like GitHub.(youtube:1)

author: JohanH
author_rank: Frequent Contributor
timestamp: February 23, 2023, 07:41:17 am
content: In the years I've worked with version control software, people outside of software and embedded development are totally ignorant of version control. It's a hard concept and most assume it to be file storage. It's a lack of education, but still, it's mostly used within software. Dave belongs to a generation where version control wasn't mandated by companies he worked for (I assume) and in late 90's and beginning of 2000, version control was very basic. CVS just started to get around and the proprietary systems were expensive (I've experience of two different ones).Git is a difficult concept even if you come from an older system. The best thing to do is to learn git from scratch. Learn the command line and basic commands. Then they will also understand github and similar online web interfaces.

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 23, 2023, 07:56:28 pm
content: Already said it, but I find git a bit too complex to use past the very basic stuff, which is straigthforward. But that's nothing unexpected - Linus never expected it to take off as it did, it was mainly for the needs of the Linux kernel maintenance when he designed it.I personally do recommend Mercurial and that's what I use when I'm not required to use git. Similar, but easier to tame and avoids shooting yourself in the foot.Certainly something to look at for those looking for an alternative (there are others too.)But as Johan said, I'm guessing the real question is about using version control in engineering outside of software dev, rather than about a particular tool.And yes, this is still pretty uncommon, but it's getting there.Of course one "hurdle" - not a dealbreaker - is that these tools are adapted to pure text. They work perfectly fine with any file format, but any diff or merge will work only on text and so is most adapted to software code. For the rest, it will just be a glorified backup system, and that's probably why it's still not that well perceived outside of software. It's useful, but not game-changing as it has been for software.

author: DiTBho
author_rank: Super Contributor
timestamp: February 23, 2023, 11:45:32 pm
content: I do preferMercurialtoo, which, talking about u-boot and the Linux kernel, I massively use integrated with my own patch-manager.Code:macmini-intel /src/machine/mips/tigra/kernel/6.02.008 # ./mybuild-2023 54 - list all files to be patched5 - apply patches6 - make patches7 - revert patches8 - list all files in the hacked list9 - generate the hacked listMercurial does all the version control job, and I keep current stuff "in trunk", this way my patch-manager can operate faster, and it's very easy to migrate patches from a kernel to an other: you can comment a patch in a special "note" section, this way the patch manager can check if a patch can be applied to a different project version.Code:# lspatch output/generated_patches/my-mm-util-c.patchmm/util.c.notemm/util.cMercurial consumes resources, a lot of ram when it's used for a large project like the Linux kernel, so as trick ... Nano has been modified and when you start a new branch and then you start editing stuff, Nano can now take tracks of the original files and the modified ones; this way the patch-manager can automatically generate patches based on diff between original and current.It consumes only 64Kbyte of ram instead of several tens of Mbyte, and since everything is always under the control of Mercurial, the patch-manager can always query Mercurial to generate the hacked file list.Code:macmini-intel /src/machine/mips/tigra/kernel/6.02.008 # ./mybuild-2023 5 8~ arch/mips/Kconfig~ init/main.c~ drivers/net/ethernet/Makefile+ drivers/crypto/hcry.c~ mm/util.c~ net/core/dev.c~ net/bridge/br_stp.c(this consumes a few Kbyte of ram)Code:macmini-intel /src/machine/mips/tigra/kernel/6.02.008 # ./mybuild-2023 5 9### generating ... from Mercurial db~ arch/mips/Kconfig~ init/main.c~ drivers/net/ethernet/Makefile+ drivers/crypto/hcry.c~ mm/util.c~ net/core/dev.c~ net/bridge/br_stp.c(this consumes up to 40Mbyte of ram)I can do the same with Git, but ...- Git consumes more resources (especially when it uses external tools, including python)- Mercurial has less dependencies, and its code is more concise- Mercurial offers a better interface for my patch-managerThe new version offers ancurses-basedmenu, so you select one/more patches to be applied or reverted.Weird way to operate, I know, but it's very very useful for me when I have to bi-sect/hack a large project with thousand files.

author: brucehoult
author_rank: Super Contributor
timestamp: February 24, 2023, 04:10:26 am
content: Quote from: JohanH on February 23, 2023, 07:41:17 amI'm pretty sure Dave is a good 5 years younger than me. Certainly his first "experience" listed on LinkedIn (1990) is 5 years after I graduated.CVS was first released to the public in 1986 and was put under the auspices of the FSF in 1990.I personally didn't have anything at home that could run CVS until I started using Linux around 1997 or 1998. Before that at home I used Apple's "Projector" in MPW, and also from CodeWarrior. At work I was using things such as Visual SourceSafe and PVCS.I started using cvs in open source projects in 1998, and in a company in 2002.Companies were switching from cvs to svn in 2003-2006. And then to git in 2006 and on.I've also used sccs, rcs, Perforce, and probably others my brain has blocked memories of.I have no idea what they were doing in electrical engineering, but as a 60 year old programmer I can't remember a time after student days that I *wasn't* using version control software.Quotegit is *worse* if you come from another system. But git is actually very simple. It's just taught very badly, and by people demonstrating bad practices.

author: JPortici
author_rank: Super Contributor
timestamp: February 24, 2023, 06:46:55 am
content: I am still a VCS novice, i was never taught about VCS and used to copy everything manually every time (well, i still do that for most things)it helps that i am the sole developer (and the graphic is the sole graphic, and so on) but it's no way to mantain things in the long run.At some point i decided to get inversted in learning VCS and as you can imagine most, if not all, the supposed information you can get from googling is the usual BS:-comparing SVN with Git, git is better-and of course don't use mercurial because it's dead-actually svn is dead too-git this, git that, you must use git-actually git is github, no now it's gitlab because github is evil because microsoft is evilas you can imagine, a lot of highly ranked low quality search result, blog posts copying each other.I could find nothing about better practices, how to set up a workflow, the things you may really want to know.Anyway, in the meantime i decided to use SVN as i had to decide between what the IDEs i use supported and the choice initially went to SVN with Tortoise svn and a bunch of local repositories (sole developer, everything on my pc which is of course backed up) . SVN as i saw the problem in git not handling binary files well and besides source code everything else starting from PCBs is binary (though i'm changing to other formats as well, but old projects..)However lately i decided to switch to git. The reason is not because i think git is better in any way, but it is in the github experience.I always saw a parallel between git -> github and svn -> sourceforge. To me github is way better, has a better UI and UX, i like the "Issue" and the wiki parts.This is relevant because i wanted to convince other people at work to use VCS, if anything for the project that are not done by one person (for example, very old software i'm mantaining, another person has the software for making the installer and all the final steps on their PC and every time is did you update X on my? is Y ok?) i hate manual copies, it's so easy to keep the wrong copy around. and i hate incrementing a version number for every comma, as we use major.minor in version numbers you can see how it's inconvenient.So i was looking at self hosted git and i stumbled upon Gitea, you get an UI/UX very simillar to github but you can self host. And i can see the possibilities, do a repo for every project, let it be software, hardware*, photo*, video* (*yes, i know, binary files), documentation/procedures, then for everything you have the issue to report problems without telling anybody by voice or email or stupid postit, you can edit your problem and add images and meaningful description and keep trace of everything, all in a local server accessed by everybody in the company. Same for the wiki part, documentation on the project online, yes please. The project planning features are basic but still useful, at least to put a date on the calendar. When something is done or changed you get the notification.The fact that it uses git forces me to adopt git, i wonder if a simillar system is available with SVN

author: JohanH
author_rank: Frequent Contributor
timestamp: February 24, 2023, 08:12:36 am
content: Quote from: brucehoult on February 24, 2023, 04:10:26 amThe concept is old. But the company I work for didn't start using any form of VCS before around 1998. And we produced a lot of code to be a hardware company. VCS wasn't even mentioned during my studies in the latter half of 90's. Now the awareness is better.Quote from: brucehoult on February 24, 2023, 04:10:26 amTrue.

author: brucehoult
author_rank: Super Contributor
timestamp: February 24, 2023, 10:35:26 am
content: Quote from: JPortici on February 24, 2023, 06:46:55 amThat is absolutely not true.Git in fact treats ALL files as binary, and and stores byte-by-byte binary diffs between revisions or between similar files, not line-by-line diffs.What git doesn't like is binary files where any trivial change to the file changes the entire file, so it CAN'T be diffed. That generally means any kind of pre-compression or encryption.Types of binary files that git loves: disk images, databases, bitmapped images without compression such as (some) TIFF files, tar archives (NOT .tgz).git stores everything compressed AFTER it diffs it. Compressing things before giving them to git prevents diffing.You can still store such files, but every version has to be stored in full.It's hard to imagine any other RCS that does better -- unless they specifically recognise certain types of compressed files and automatically uncompress them.

author: JohanH
author_rank: Frequent Contributor
timestamp: February 24, 2023, 10:49:27 am
content: That's why file types like pdf and similar are not that good. They do not diff well. There are solutions for this. One of our projects use Git LFS (Large File Storage) where they store files that are hard to diff, but they really want to be handled by git. There are some disadvantages to this, but in all it works well.

author: JohanH
author_rank: Frequent Contributor
timestamp: February 24, 2023, 11:00:05 am
content: Binary file changes is interesting from VCS and archiving point. IMHO, all software should consider making as little change as possible to the original file when when saving to disk and overwriting. This would be beneficial for a lot of things.A different case, but that touches this issue with binary changes is the Debian project with reproducible builds (https://wiki.debian.org/ReproducibleBuilds). It's incredible (and important) how they are able to repeat builds in different systems and ending up with the same final binary with same checksum.

author: DiTBho
author_rank: Super Contributor
timestamp: February 24, 2023, 01:23:54 pm
content: Quote from: brucehoult on February 24, 2023, 04:10:26 amlist+="Doors"

author: DiTBho
author_rank: Super Contributor
timestamp: February 24, 2023, 01:29:53 pm
content: Quote from: JohanH on February 24, 2023, 11:00:05 amGood find! I need something similar!Thanks!

author: mapleLC
author_rank: Frequent Contributor
timestamp: February 27, 2023, 10:21:38 pm
content: I have a 20 year career in software development and do not understand Git, Github, and even where the damn downloads on the page areIts quite confusing in the way GNU was/is and other things like a Java Bean.The whole system could do with a Steve Jobs for a few weeks to clean up the story.

author: brucehoult
author_rank: Super Contributor
timestamp: February 28, 2023, 03:33:52 am
content: Quote from: mapleLC on February 27, 2023, 10:21:38 pmSteve Jobs, about iPhone 4 antenna being masked by the user's hand: "You're holding it wrong"

author: JohanH
author_rank: Frequent Contributor
timestamp: February 28, 2023, 08:27:48 am
content: Quote from: mapleLC on February 27, 2023, 10:21:38 pmThat's because Github isn't primarily a "download page". It's a software source repository with some added project management features. You are meant to copy the source by running "git clone <address>" on your own computer. That some projects provide binary downloads is something that came later and is an added bonus and a feature of the github web pages. Github is trying to become an online integrated software source, development and project management system with issue tracking etc. It works well at least for smaller, open source projects.

author: Halcyon
author_rank: Unknown
timestamp: February 28, 2023, 09:14:56 am
content: My view of GitHub outside software development is that it's irrelevant.

author: shapirus
author_rank: Super Contributor
timestamp: February 28, 2023, 09:41:37 am
content: Quote from: Halcyon on February 28, 2023, 09:14:56 amIt, like any VCS, may be used for version-controlled work on any digital data, which is not limited to software source code.Git is great, but the more years I use it, the more I, sometimes, think that it was created by aliens for aliens. It may take time and forgetting of what you already know to grasp and get it right.For a complete VCS beginner, especially for a solo developer beginner, a non-distributed VCS (such as Subversion; forget about CVS) may be a better and easier to understand tool. For an easier start in distributed systems, Mercurial is a good choice, however git has become an industry-standard tool these days, so if you expect to collaborate with others, you will need git.Does a solo developer need to use VCS? Yes, absolutely. It pays off in the long run and is well worth the initial effort.Why do people have trouble understanding VCS? Because they start at the wrong entrypoint. The right way to start is to learn what problems VCS are made to solve.

author: tszaboo
author_rank: Super Contributor
timestamp: February 28, 2023, 10:29:34 am
content: For HW development, I've been using SVN because that's what I was shown. Plus, Altium supports that. I've tried git for it, but it wasn't really good. Binary files made the performance bad, plus it was difficult to explain the concept to others. Or to remember it myself sometimes. This leads to issues ("did you push it?"), that can be avoided by using SVN so we just go with the path of least resistance.On the other hand github is free, so I use it for personal projects.

author: Karel
author_rank: Super Contributor
timestamp: February 28, 2023, 10:44:17 am
content: I started to use git ten years ago. We were still using Eagle V6 & V7 and I must say, using git for backup & versioning (not merging!) always worked very wel becausethe xml files of Eagle were pretty much "human readable" so "git diff" was usable.Now, with KiCad, not so much because in my opinion the files are harder to read and understand and also, KiCad has the nasty behaviour to reorder elements that didn't changebut ofcourse it is a change as far as git is concerned. Still, for backing up and versioning only, git works fine also for KiCad.

author: JohanH
author_rank: Frequent Contributor
timestamp: February 28, 2023, 10:58:21 am
content: Quote from: Karel on February 28, 2023, 10:44:17 amThis is what I hate with some software. I remember a proprietary one that when you saved, it reordered some variables in a random fashion even when there were no changes done to files belonging to the project. So when checking in changes to VCS, it always detected changes in all files. Very annoying.If KiCAD does the same, it should be reported as a bug. I haven't checked this myself.

author: mapleLC
author_rank: Frequent Contributor
timestamp: February 28, 2023, 01:44:17 pm
content: Quote from: brucehoult on February 28, 2023, 03:33:52 amTechnically, he was right.

author: brucehoult
author_rank: Super Contributor
timestamp: February 28, 2023, 08:30:39 pm
content: Quote from: Halcyon on February 28, 2023, 09:14:56 amSoftware developers are not the only people who can benefit from being able to track N changes to a document or set of documents, see who changed what when, revert to old versions if you made a mistake, and do all this using much much less than N * document_size disk storage.The LLVM compiler project currently has 453000 commits (changes) over its lifetime. A git checkout that contains that entire development history, checkable without any further internet connection, is SMALLER (2635 MB, of which 1048 MB is the .git database and 1587 MB is the checkout) than an svn checkout of it (3174 MB) that has only the current version and needs a live internet connection to do even "svn log".But git is just as useful if you are writing the Great American Novel.

author: JohanH
author_rank: Frequent Contributor
timestamp: March 01, 2023, 07:47:00 am
content: Quote from: karpouzi9 on March 01, 2023, 02:58:10 amGreat! Seems to be in order.

author: AntiProtonBoy
author_rank: Frequent Contributor
timestamp: March 21, 2023, 06:45:03 am
content: I'm predominately a software dev by profession, so git seems natural to use for me. So I ended using git for a whole heap of things. For example, I collect recipes for cooking and use git to track revisions, edits, etc. I've also been using git and git LFS for graphics design projects. Also use it for my web site, scripting experiments, schematics, and so forth. Super useful.

author: mapleLC
author_rank: Frequent Contributor
timestamp: April 10, 2023, 12:29:26 pm
content: Quote from: AntiProtonBoy on March 21, 2023, 06:45:03 amThis seems like what immutability on the block chain was for.

author: brucehoult
author_rank: Super Contributor
timestamp: April 11, 2023, 12:05:46 am
content: Quote from: mapleLC on April 10, 2023, 12:29:26 pmImmutability and traceability come from the use of Merkle trees, which is the technology both git and the Bitcoin blockchain are based on, in different ways.