Sunday, May 12, 2024

Git - Skip-Worktree

If you have files that you don't want to commit then . . . 

Assumiing you have TortoiseGit installed.

Windows File Explorer > Right Click on File > Show More options > Properties > Git Tab > Check Skip-Worktree > Apply > Ok > F5 to Refresh Displayed Files

The skip-worktree flag in Git is used to tell Git to exclude a specific file from the working directory whenever possible. 

This means:

Git will avoid writing the file to the working directory during operations like checkout, pull, or switch.

Git won't track changes made to the file, even if it's present in the working directory.

Git won't record the absence of the file in commits.

This flag is useful for configuration files or other files that should not be accidentally committed but might need to be edited locally sometimes.

Here's a table summarizing the key differences between skip-worktree and the similar flag assume-unchanged:

Use Cases for skip-worktree

Configuration Files: You might have environment-specific configuration files in your Git repository that shouldn't be committed but need to be modified locally for development.

Third-party Libraries: Large libraries included in your project can be marked with skip-worktree to avoid cluttering your working directory and improve performance.

Things to Consider

skip-worktree requires some manual work compared to assume-unchanged. If you need to make changes to the file, you'll have to manually add it back to the working directory before editing.

skip-worktree doesn't work with all Git commands. For instance, stashing won't work on files with this flag.

I recommend checking out the Git documentation on git-update-index for more details on the skip-worktree flag https://git-scm.com/docs/git-update-index. There are also resources online that discuss using skip-worktree for specific scenarios, like managing configuration files.

Google Gemini

Resources:

How To Fix Gitignore Not Working - Kinsta®

Git – Problem with “skip-worktree” and Pull - CodeProject

Ignoring Files with Git | Automation Panda

Warning: The skip-worktree setting applies only to the local repository. It is not applied globally! Each developer will need to run the skip-worktree command in their local repository.

Saturday, May 4, 2024

Git - Assume Unchanged

If you have files that you don't want to commit then . . . 

Assumiing you have TortoiseGit installed.

Windows File Explorer > Right Click on File > Show More options > Properties > Git Tab > Check Assume valid/unchanged > Apply > Ok > F5 to Refresh Displayed Files

Example

To undo Assume UnChanged . . . 

Windows File Explorer > Right Click on File > Show More options > Properties > Git Tab > UnCheck Assume valid/unchanged > Apply > Ok > F5 to Refresh Displayed Files

Resources: Ignoring Files with Git | Automation Panda

That's it !

Monday, March 25, 2024

Git - Overview

Git is a popular version control system (VCS) for software development projects. Unlike older systems, Git is a distributed system, which means every developer working on a project has a complete copy of the project history on their local machine. This allows for faster and more flexible collaboration.

Here's a quick rundown of what Git offers:

  • Tracks changes: Git keeps a record of all changes made to the code over time. This allows developers to see exactly what was modified, by whom, and when.
  • Collaboration: Multiple developers can work on the project simultaneously without stepping on each other's toes. Git's branching feature enables developers to isolate their changes and integrate them back into the main project seamlessly.
  • Non-linear development: With Git, developers can create branches to experiment with new features or bug fixes without affecting the main codebase. This allows for more flexible and efficient development workflows.

Here are some key concepts in Git:

  • Repository (repo): This is a central location where all the project files and their revision history are stored. It can be hosted on a platform like GitHub or be local to a team's machines.
  • Working directory: This is your local copy of the project files from the repository.
  • Staging area: This is a temporary holding area where you designate specific changes to be included in your next commit.
  • Commit: This is the act of capturing a snapshot of the project's state at a particular point in time, along with a descriptive message.

If you're new to Git, there are many resources available online to help you get started, including tutorials, documentation, and interactive courses. https://git-scm.com/docs/gittutorial

Friday, January 26, 2024

MySQL Configuration for Altium DBLib and Parts

Link to MySQL Community Downloads

Video Link https://youtu.be/W-L1IPFr2Fc

Recommended Download: MySQL Installer for Windows

Recommended Configuration for Altium DBLIB and Parts.


MySQL Server Version 8.0.36
MySQL Workbench Version 8.0.36
MySQL Connector/ODBC Version 8.0.32

Notes:

Connector/ODBC Version 8.0.32 is Highly Recommended for use with Parts.

Connector/ODBC Version 8.0.33 and higher are NOT Recommended for use with Parts.

Click on the Archives Tab and look for MySQL Connector/ODBC Version 8.0.32

In Altium . . . Create a New DBLib ! ! !

Open Altium > File > New > Library > Database > Create

Select Use Connection String
Enter Connection String
Advanced >  Enter tick marks > Ok
Connect

There is a bug in Altium . . .  if you edit an existing DBLIB the connection it may fail. 

Example Error msg in Altium DBLIB . . . 


Could not get column list for table . . . 

If the Altium DBLib connection to the server fails then try creating a new DBLIB.

That's it !

Sunday, January 14, 2024

Parts A365 Git Repo for Access DBLib

Please note the following Access database example is not for multiple remote librarians.

This solution is suitable where there is one librarian and multiple users.

A cloud hosted MySQL database can be used to support multiple remote users.

Create a folder and copy the following folders and files

Open Parts Repo.PrjPcb in Altium then right click

Select Make Project Available Online

Close the project in Altium

Use TortoiseGit to Add, Commit and Push files to the Parts Repo.

TortoiseGit can be used to commit and pull symbols and footprints from the repo.

That's it !

Saturday, January 13, 2024

git: 'credential-manager-core' is not a git command.

Solution:

Open .gitconfig and delete two lines then save .gitconfig

[credential]

    helper = manager-core

C:\Users\UserName\.gitconfig











That's it !

Friday, January 5, 2024

Best Schematic and Library Practices

Problem:

Do NOT allowing swapping symbol pin locations in the schematic.  If you update from library later, it will use the symbol from the library that does not have swapped pin locations. 

Solution: Create an Alternate part in the *.Schlib

Problem:

When using DBLIBs do NOT leave Footprint Refs embedded in Schlib files or you can end up with the  wrong Footprint placed in the design.

Library Hierarchy is Left to Right and Top Down

I recommend you do NOT use the Search paths, or use them very wisely.

Altium will search your entire C: Drive you set the Search Path to C:\ 

Problem:

Duplicate Library or Footprint Ref.

Solution:

Use single part libraries with file names that match the Ref, then place all Symbols in a folder named Symbols.  Do the same for the Footprints, use single part PCBLIBs with matched Ref and File names placed in the Footprints folder.

If the Refs match the file names it will now be impossible to create a duplicate part using the same name when all of the like type libraries are in the same folder.

Note there should be no Footprints listed in the SCHLIB files.

I prefer using DBLIBs.

Problem:

Inconsistent file paths found in Footprint properties

Example two different users placing parts from the same DBLib







Solution:

Example

Use Version Controlled GIT Repo and instruct all users to Clone to the same Folder on their local machine, example  C:\Parts Git Repo

Folders in C:\Parts Git Repo\


Using Store Path Relative to Database Library' in the DBLIB will make your database portable. You can move the DBLib and libraries to another drive or folder with no need to specify the absolute path to the database.

As shown above the Symbols and Footprints folders should be in the same folder as the DBLib.