Git 101
  • 3 Minutes to read
  • Dark
    Light
  • PDF

Git 101

  • Dark
    Light
  • PDF

Article summary

Git 101: What is Git?

Git is a magic tool to help you track, version, and release your files.

It is easy to learn everything you need to know for day-to-day tasks, and powerful enough for automation.

Git runs on our AllSpice server and on your local machine.

Track your design changes

Artboard 1 copy 4git slides.png
  • Change from main to develop branch

  • Create design changes on their local file system

  • Commit the files to their local develop branch

    • Add a meaningful commit message

    • "Remove C237, 0.2uF bypass cap from U14

  • Commits are pushed to remote branch

Review your design changes

Artboard 1 copy 5git slides.png
  • Create a Design Review to merge develop branch to main branch

  • Team reviews changes

    • Suggest/require changes

    • Review fabrication/output files

    • Create Issues to resolve/defer action items

    • Approves design review by merging develop branch to main

Git 101: Installing Git

your title goes here

If you've never used Git before, then we recommend GitHub Desktop for ease of use. Your teammates might make a recommendation

  • Git Bash Command Line Interface (CLI) Download

  • TortoiseGit Download (File Explorer interface)

  • GitHub Desktop Download (Easiest for beginners)

  • Source Tree Download

Git 101: Branches

Branches organize and control change

Changes are first committed to a local branch and then are pushed to a server. Changes can't move from one branch to another without using a design review, or by manually adding them.

We recommend a two-branch strategy for hardware development.
- Main branch alway is the latest release
- Releases for V1, V2...VN
- Develop branch contains proposed changes
- All developers work on the same branch

Branch protection allows you to prevent accidental pushes or merges.

  • Visit your repository settings

    • Click on the Branches menu

    • Click on "Add New Rule" to add a new rule

    • Add the name of the branch you would like to protect and configure the settings.

    • We recommend disabling push

Git 101: Design reviews

Design reviews

Git Design Reviews allow you to verify the file changes before you merge one branch to another. It is the equivalent to an ECO.

image.png

AllSpice.io Design Reviews are Git Pull Requests (PR) with a name more familiar to electrical engineers

Design review interface

Design Reviews have 3 main tabs

  • Design Review interface

    •  Screenshot 2024-01-11 at 1.25.10 AM.png

  • Conversations

    • Reviews

    • Requests for change

    • Comments or instructions

    • Request for investigation

  • Commits

    • Serial list of all changes

  • Files Changed

    • Visual diffs of PCBs, Schematics, BOMs, and any text files

Creating a Design Review

  • Visit your repo

  • Click on the Design Reviews Tab

  • Click on New Design Review

    •  image.png

  • Select the pull-from branch on the right. This is usually develop

    •  image.png

  • Ensure the branch on the left is your target branch. This is usually main.

  • Click New Design Review

    •  image.png

  • Enter a name or title for your review

  • You can create a Design Review template that will pre-populate the description with useful information and checklists. To learn more visit the main article.

  • Add any Labels needed to categorize the review

  • Attach milestones to track your repos

  • Once everything looks ready, click Create Design Review

    •  image.png

  • Add Reviewers who will approve and be able to comment

    •  image.png

Design Review Visual Diff (Files Changed)

The Files Changed Tab helps you review your changes.

  •  Screenshot 2024-01-11 at 1.38.41 AM.png

On the left is a file tree showing which files are new, which have changes, and which have been deleted.

The file diffs are on the right.

You can create snippets to communicate any requested changes.

  • View your schematic or PCB

  • Click on Snippet

  • Highlight the section you wish to show

  • Click the "+" button

  • Add your custom message

  • Click "Add single comment"

    •  snippet.gif

To learn more Full article

Git 101: Issues

Issues are the equivalent of Action Items. You can use them to highlight work that needs to be done immediately, or use it to track work done over time.

You can attach files and have a full conversation about the issue. You can gate Deisgn Reviews from completing until certain issues have been closed.

You can create multiple issue templates and create custom interfaces.

Creating an issue

  • Visit your repo

  • Click on issues

  • Click new issues

  • If you have multiple issue templates, select your template

  • Fill out the issue

  • Assign Assignees, add labels, attach to milestones

  • @mention your teammates
    lib issue.gif

    • How do you use them

Git 101: Milestones

Please visit our main article on Milestones

Markdown

Markdown is a lightweight markup language with plain-text formatting syntax. Its main goal is to be easy to read and write, even when not converted to HTML. This article is written in markdown.

Visit our full markdown guide

Releases

See our full article on releases


Was this article helpful?

What's Next