Version control for hardware developers // Git, GitHub, KiCad

Поделиться
HTML-код
  • Опубликовано: 7 авг 2024
  • #git #github #hardware
    This will be a thorough walkthrough of some common git commands like git commit, git branch, git log, git submodules, git tags, and git hooks with a simple KiCad project and Arduino firmware files. We will also push the local repository to GitHub and explore some GitHub features such as tags, pull requests, adding messages that can change some GitHub status of closing the raised bugs.
    ⏰ TIMESTAMPS
    0:00 Intro
    02:22 git commit
    07:37 git log
    09:50 git submodules
    12:53 git branch
    22:25 git hooks
    24:31 git tags
    29:15 semantic versioning
    30:50 Outro
    ‣ Some links below are affiliate. I receive a small commission at no extra cost to you.
    🎩 DEMO FILES
    git shortcuts github.com/sayanee/dotfiles/b...
    🔗 LINKS SHOWN
    An Introduction to Git for Hardware with Altium Designer | Blogs | Altium resources.altium.com/p/introd...
    AllSpice: Hardware Development Tools for Electrical Engineers www.allspice.io/
    File Formats | KiCad EDA kicad.org/help/file-formats/
    gitignore/KiCad.gitignore at master · github/gitignore github.com/github/gitignore/b...
    Automating Fabrication Outputs With KiCad And Git - Jesse Vincent (KiCon 2019) - RUclips • "Automating Fabricatio...
    obra/kicad-tools: Various bits of automation for using KiCAD and Git together github.com/obra/kicad-tools
    productize/kicad-automation-scripts: A bunch of scripts to automate KiCad processes github.com/productize/kicad-a...
    xesscorp/skidl: SKiDL is a module that extends Python with the ability to design electronic circuits. github.com/xesscorp/skidl
    Conventional Commits www.conventionalcommits.org/e...
    Conventional Changelog Action · Actions · GitHub Marketplace github.com/marketplace/action...
    version control - Is it better to merge "often" or only after completion do a big merge of feature branches? - Software Engineering Stack Exchange softwareengineering.stackexch...
    Linking a pull request to an issue - GitHub Docs docs.github.com/en/github/man...
    Creating a commit with multiple authors - GitHub Docs docs.github.com/en/github/com...
    About pull requests - GitHub Docs docs.github.com/en/github/col...
    awslabs/git-secrets - Prevents you from committing secrets and credentials into git repositories github.com/awslabs/git-secrets
    Semantic Versioning 2.0.0 | Semantic Versioning semver.org/
    hardware-semantic-versioning [qyx.krtko.org] qyx.krtko.org/wiki/hardware-se...
    🔌 TOOLS USED
    hutscape.com/tools
    🎶 MUSIC AND SOUND EFFECTS
    New Morning by Tracktribe from RUclips Audio Library • TrackTribe - "New Morn...
  • НаукаНаука

Комментарии • 31

  • @benjaminrockwell5715
    @benjaminrockwell5715 Год назад +1

    Great video. Your presentation is clear and well thought out. I am working through these issues for my projects and you helped clarify several things. I was thinking of structuring my repositories is with a similar hierarchy. i.e. a firmware and hardware folder within a single repository, but after watching your video I am having second thoughts due to Git/Github tags and releases. The firmware and hardware versions will not necessarily be the same, but since the version tag is assigned to the repository as a whole it is unclear if it is for firmware or hardware or both. I am thinking it may be best to have separate firmware and hardware repositories which would allow for separate version tags for each. If needed a dummy main repository that includes each of these as a submodule. Any thoughts?

    • @sayanee
      @sayanee  Год назад

      Great question! Should the firmware and hardware version be the same? I have thought about this too!
      It all depends on the *complexity, process and users* of the project. For me, it is a hobby project for a single person, so I don't mind keeping both the hardware and firm in the same git repository. But I also want to know which hardware / PCB layout was sent out for manufacturing. Hence, I git tag that version.
      But look at the Apple iPhone which is a huge project with over millions of users. Their hardware version E.g. iPhone 11 or iPhone 12, etc is different from their software or the OS E.g. iOS 15.4, iOS 16, etc. I am sure, internally even within their firmware they have various components with different versions for tracking.
      So I would say, start with a mono repo, a single version. As the complexity of the project, the team, and users grow, break it apart.

  • @TheSuaveBOSS
    @TheSuaveBOSS 3 года назад

    Fantastic tutorial! Really enjoyed the step-by-step explanations. Keep up the great work!

  • @ulwur
    @ulwur Год назад

    Thanks! Great walkthrough, gave me ideas on how to incorporate git in me workflows!

  • @BrianArsenault
    @BrianArsenault 3 года назад

    Very helpful tips, thank you!

  • @faizalabdulghani3287
    @faizalabdulghani3287 3 года назад

    Very helpful, thank you.

  • @bastianbaggins8700
    @bastianbaggins8700 3 года назад

    Great video. Thank you.

  • @RusokuLab
    @RusokuLab 2 года назад

    Very helpful.Thanks.

  • @MkmeOrg
    @MkmeOrg 3 года назад

    You do a great job on these

    • @sayanee
      @sayanee  3 года назад +1

      Thank you! You have a very interesting channel with similar interests. Mechanical stuff like 3D Printing, robotics, and drones are something I always keep in view, so thanks for sharing these topics 🙂

  • @cioccarellimi
    @cioccarellimi 3 года назад

    great work! Keep it up

  • @alejandroperez5368
    @alejandroperez5368 2 года назад

    I wouldn't have used alias in this tutorial, maybe once to introduce it as a trick.
    Great video anyway, thanks!

  • @negrocunnilingus
    @negrocunnilingus Год назад

    wow!! thanks a lot :D very usefull information... please go ahead...
    Gracias😊

  • @Ferreira019760
    @Ferreira019760 3 года назад

    This will be a general comment, not exactly about this video in particular. Firstly I’d like to commend you on your knowledge. You clearly devote an incredible amount of time to engineering and it’s without a doubt your passion. Or one of them at least.
    I don’t see anything fundamentally wrong in what you have been putting out, the contents are great, your diction is very good and your explanations are straight to the point. You don’t present yourself as an expert, yet you know more than some supposed experts out there. Kudos for humbleness.
    The one thing that I haven’t found yet, and maybe you have it, are walkthroughs for the beginner. How to setup a beginners lab, what to buy, and how to get started with the easiest possible learning curve. Obviously discipline is required and people must do their homework, but that is something that is really missing out there. It’s either crummy courses that no matter how cheap or expensive, they don’t prepare you to face real life challenges and stick too much to the theory side of things, or you need a strong background already because it’s too advanced. The middle level is quite hard to find, and so quite often people get stuck or take ages to transition from one to another.
    Love the quality of your videos, I’ll break it down in detail as why. You have a clean workspace, the lighting is good, image quality is more than enough and you don’t beat around the bush. I have no idea wether you are putting together a training program, or thinking of starting a course where people could enroll. You come across as being in control of the subjects you put forward, I can tell you prepare ahead quite well. All the qualities of a good teacher. Something on-line, that people could do at their own pace, no need for grades or certificates, just knowledge sharing and experience building. If people want certificates there is plenty out there that already provide that. Diplomas are only good enough to get you in a job, wether you stay is up to your knowledge. When people don’t have it, it’s not the diploma that will keep them above water. Please take these as mere suggestions, I’m not in any way pretending to tell you what to do. If you know anything like what I described please share, I’m interested.
    In conclusion and straight to the point. I neither praise undeserving people nor do I hold back if a compliment is in order. And what you do is very good as far as I’ve seen.
    P.S. I wish I had more available time to watch more of your videos, there is a ton until I catch up. I believe I’ll have to make some space in my calendar so I don’t stray away with distractions.

    • @sayanee
      @sayanee  3 года назад +1

      Thank you so much for your thoughtful comments.
      This channel is an outlet for me to share the *process of building IoT-related home automation projects* that I'm building. IoT technologies are so varied. They range from web, cloud, security & privacy all the way to electronics, PCB design, mechanical, and embedded. It is literally not possible for a single person to be an expert in all these fields. Hence, I always make sure to mention that I'm not an expert, but someone trying to learn these topics and integrate them.
      Apart from my (biggest) interest in building these engineering projects, I also have interests in videography, photography, design, and user experience. I definitely use the videos as an outlet to experiment with them and hope I can upgrade my gears and skills in time. Hence you are once again right about the video and content quality.
      As for the topic of setting up a beginners lab, I'm not sure whether that was a suggestion for a video or you want to learn more about it. Nevertheless, I would like to point out 3 resources that have helped me in the past:
      1. Basic/Advanced Tools & Materials for Electronics by Great Scotts ruclips.net/video/cL8FHz-TOzQ/видео.html
      2. Essential Tools that you will need for creating electronics projects! by Great Scotts ruclips.net/video/7-djg27lJyQ/видео.html
      3. The Electronics Workbench: a Setup Guide by Peter Dalmaris (paid on Udemy):
      www.udemy.com/course/workbench/

  • @experiencedlab1969
    @experiencedlab1969 3 года назад

    Git has many commands.
    I still don't understand if it is possible to save hooks in a repository. Or if each participant creates hooks locally.
    I also did not understand where a files will be located when connecting submodules. 🤔

    • @sayanee
      @sayanee  3 года назад +1

      Regarding Git in general, I took a long time before I could grasp a few more commands, and even then, today I still pick up bits and pieces. If you are totally new to git and don't like the command line way, then I suggest using the GitHub UI app or other UI-driven Git app. Or if you still want to learn the command line way, then I suggest sticking to just committing your changes in the main branch itself and revisiting the history. After all, being able to go back in history is the essence of a version control system.
      Regarding git hooks, yes you are correct that we cannot save these hooks in a git repository because .git folder is ignored. So a possible way is to have a "git" or "scripts" folder where you can store them and commit them. Upon git cloning, you can "install" or copy those scripts over into your local ".git" folder. In this way, each participant can also see the git hooks and share them. E.g. github.com/holman/dotfiles/tree/master/git
      Regarding git submodules, the command for the git submodule as shown in 32:03, will have the path to the folder where the git submodule will be installed.
      E.g. git submodule add git@github.com:hutscape/kicad-library.git hardware/library
      This means in your current repository, the submodule will be installed in the folder hardware/library.
      Hope this helps! Once again, just do it step by step, and maybe just focus on a few git commands and get comfortable. It can be pretty daunting, but thankfully there are plenty of online tutorials as well:
      guides.github.com/introduction/git-handbook/
      www.atlassian.com/git/tutorials
      git-scm.com/docs/gittutorial

    • @experiencedlab1969
      @experiencedlab1969 3 года назад

      @@sayanee Thank you very much for your comments and for sharing your experience. I will try to use this in practice.
      Git has another interesting moment when a _commit_ drops out of a branch, but SHA is not deleted.
      For GitHub Desktop 32-bit automatically created SSH, in the new version 64-bit I need to deploy it locally (by hand). This summer GitHub will disable the ability _to Push_ by password.

    • @sayanee
      @sayanee  3 года назад +1

      @@experiencedlab1969 Haha, yes the SHA1 not deleted actually can be used to your advantage!!
      I remember once deleting an entire branch, but thankfully I could still retrieve the code because I could simply do a "git checkout [sha]" 😅 Example here stackoverflow.com/a/3640806/496797
      Once again, git is doing what it is supposed to do - going back to our previous work and not losing them!

  • @ramasamyramasamy
    @ramasamyramasamy 3 года назад

    Hi mam, if you don't mind could you please give some info about using in Windows platforms.

    • @sayanee
      @sayanee  3 года назад +3

      Do mean how to install Git on Windows? Then try this link: git-scm.com/book/en/v2/Getting-Started-Installing-Git#_installing_on_windows
      If you mean installing KiCad on Windows, then try this link: kicad.org/download/windows/

    • @jpconstantineau
      @jpconstantineau 3 года назад +1

      I use kicad, Arduino, vscode and git on windows all the time. Pretty much everything applies with the exception to those aliased commands. You just need to type the commands in full.

  • @Ender_Wiggin
    @Ender_Wiggin 3 года назад

    Where do you work. You seem like some i would like to work under

    • @sayanee
      @sayanee  3 года назад

      I work in Singapore. I don't work with a team as of now, hopefully one day :)

    • @Ender_Wiggin
      @Ender_Wiggin 3 года назад +1

      @@sayanee That explains why your English is so good. I hope to visit Singapore one day. Do you happen to know of Loneoceans labs.

    • @sayanee
      @sayanee  3 года назад +2

      @@Ender_Wiggin This one? www.loneoceans.com/labs/about/ Wow cool :) Tesla coil nerd. Never heard before, but thanks for letting me know.
      Do visit us once the pandemic is over. I know it's far in Asia, but it's a well-connected island.
      I miss my local dev community meetups and friends! There's also hardware related meetup group. Some are still happening over Zoom now. I owe a lot to the local dev / maker community for my interest in web / hardware / tech 🙏🏼

  • @jmalt31
    @jmalt31 Год назад

    Maybe it just me and my inexperience with GIT. But I feel that she moved way too fast and did not explain each step of what she was doing completely. Looks like she was using MAC so I did not catch all of the commands. and she seemed to be jumping around to different software (or possible GitHub) to do certain things. I will have to learn some more about GIT before coming back to this. I am a Kicad user and do programing with Micrcontrollers so I am not a total noob. I am just not a developer so I am coming at this from a hardware electronics, robotics, and animatronics background.