L: 6/5/2023 – 6/18/2023
M: 6/19/2023 – 7/2/2023
N: 7/3/2023 – 7/16/2023
O: 7/17/2023 – 7/30/2023
Summary: About two months since I last posted. Fixed broken printers, built entire BJJ sign including wood framing, finished second AoE notebook, started FPGA study, ordered a Rat Rig, trained Vince to 3D model for NVS, installed RGBW strips for Blake, completely reorganized the Lab equipment.
The parts finally arrived for fixing the second Kobra Max printer. After fixing it, I printed all the letters for the BJJ sign, wired and insulated their lights, purchased wood and tools for the frame, assembled and painted the frame, and put the whole thing together with a standalone electrical box. It’s ready for delivery, just been doing some weather testing.
I also finished my second full notebook on AoE study and decided to pivot back to FPGA for the time being. I bought a few courses off an 85% udemy sale, and am giving online course content for engineering a shot. The idea of making my own course in the future interests me, but I avoid doing stuff like that because it all seems like a grift. I figured I should give it an honest try.
I also ordered and received a Rat Rig V-Core 3.1 – 500mm kit. The aluminum extrusions for the frame arrived destroyed, so I had to wait for another shipment, free of charge. Now it’s ready to build. I still need to go get the acrylic panels cut for it.
I’ve also been keeping up with normal neon sign orders during this time. Things have been very stop and start since I’ve had to travel so much for work lately, and many people have wanted to come visit us this summer. It’s been fun and busy, but ultimately not as focused as I was hoping a few months ago.
I also stopped by Blake’s house and installed some addressable RGBW strips in his room for him. Budget allowed for some professional looking work, and I got to make it look nice and polished.
Since the closet has been absolutely overflowing with filaments and light strips alongside all the other equipment I have, I spent some money on prime day and got some nice shelving to put behind my chair in the main room of the lab. Now the closet is mostly empty, and my tools, parts, equipment, etc. are all accessible from my chair and I don’t have to get up anymore.
The last few months have been super chaotic but I’ve been finding ways to keep things very organized despite this. I’m looking forward to the next couple months of building and learning. Considering doing informal vlogs on what I read and learn as I move through my FPGA self-curriculum.
Leafeon
All NVS and AOE
Metagross
AoE
Finally finished 2nd notebook
2-21-2023 -> 6-28-2023
3.2.3 -> 4.6.6
NVS
Rat Rig Ordered
Payment went through around 6/27
Not sure how long shipping will take
Expecting the build to take 40+ hours
Also need to research the misc equipment that I need to square it
And ASA printed parts, colored ASA for the purpose, etc.
I also need to look into building the mobile platform thing that one guy made
Frame Design
need to cut 12′ into 3×4′ or go to home depot
don’t know if i can use scroll saw or hacksaw
need to find epoxy box
need to order more silicone and more 2 part epoxy
might run out of white strips, should figure that out asap – would mean some reprints or higher costs
been thinking I should just use nuts and bolts to strap the sign on, rather than screws
not sure if I can find all that at home depot
can add lights and wiring to everything but the logo before assembly
all strips will be in for the epoxy’ing together
since epoxy hardens within 10 minutes I’ll need to mix epoxy continuously while i strap together each piece of the sign
these pieces of the sign will already have the silicone’d strips inside them
need to fit frame together and chart wiring ahead of time
need to start shopping for power supplies ASAP
check initial design docs, i think it was around 30A/12V
Need to make a decent switch for him as well
300-400W PSU will get warm, needs cooling
Takes about as much power as an AC Unit
Need to buy wires as well as the PSU
make sure its been turned on 100% before applying hot glue/silicone to nodes
need to mark dots on frame before strips are added, as the wires will get in the way
need to print back panels and the 100mm rail connector
will need higher power connectors for testing the entire sign. alligator clips won’t do it
might need to put PSU outside in a weatherproof electrical box, and have the run be AC
might need a third saw horse
Plan
“Need to”
need to figure out how to cut the pressure treated
need to decide on what hardware to get it onto the wall
need to leave room in the plywood for that hardware
need to buy paint and roller
need to schedule a date for installation – can handle that once testing time
need to find epoxy box
need to order more silicone and more 2 part epoxy
need to print back panels and the 100mm rail connector
need to fit frame together and chart wiring ahead of time
need to start shopping for power supplies ASAP
Need to make a decent switch for him as well
Need to buy wires as well as the PSU
sequence
assemble frame
paint frame
fit sign together
orient on frame
mark dots for screw holes
drill
disassemble sign
cut strips to length
solder wires
insulate both ends with silicone
insert strips
flood holes with more silicone
cleanup
mix epoxy and apply to sign
fuse sign one by one
flip and place on frame for work
wire nodes together
add lengths of thicker wire running out
possibly 2 additional tiers of wire
extensive power/connection testing
add very long cable run – 50′? or PSU outside?
full sign power test 72hrs resting on frame
hot glue+silicone layers on solder nodes
sun+water cycles
mount to frame
patch & paint where necessary
measure total sign weight
transport to gym
power testing
get a ladder and some hands
measure and mark drill hits
drill wall, drill plywood
mount to wall
run cable
install PSU/Switch system
24h test
clean up
FPGA Bootcamp
Udemy had an 80% sale
Bought about 20 courses
got 602 hours of content for $320 dollars
Timeline
Thinking about vlogging about my progress. Just a 10-15 minute no-script talking head, once a week or biweekly with the sprints.
Also realized that since I don’t store pictures in treesheets anymore as of mid-2022, I can just keep all the sprints in Lab Core again. and just keep lab core open
List of Courses
Sequencing of Courses
Core
Support
Intermission
Nidoking/Omanyte
Omanyte
Notes
TREESHEETS MOBILE EDITOR
i saw on instagrm two things that caught me eye.
one was an elegant little egg timer that people were using for productive time
the other was a tiny little digital typewriter that is useful for nothing but, simply writing out text. for writers who want to type on a keyboard but don’t want to be distracted by the host of other things that come with a keyboard and text interface.
my first thought was, i need that shit for treesheets. I could type stuff like this any time anywhere.
So, naturally, I started thinking of a type of embedded systems project where I get some barebones linux running just to run treesheets on the simplest B&W screen imaginable to render treesheets.
Color would be fine but the battery life would run down
There’s also the concern of how I would interface it with version control and my master sheets. It might just be simpler to carry a laptop around most of the time, but who knows.
I’d want a small and fast one though if that’s the bulk of what I’m doing.
there’s an argument for a laptop that can do some heavy lifting, gaming, etc.
Not sure what works best for me.
Writeup
LMNO
L – All AoE and NVS
M – ordered rat rig, finished notebook 2 of AoE, mapped FPGA Bootcamp
N – started git course, traveled, NVS
O – continued git course, NVS, traveled
Dates
L
6/5
6/18
M
6/19
7/2
N
7/3
7/16
O
7/17
7/30
Go Board
Contents
Introduction – Go Board Features
https://www.nandland.com/blog/go-board-introduction.html
Board arrived safely
Preloaded Script works fine
MicroUSB provides power and also is a UART line to the PC for programming
Install virtual com port drivers from FTDI
Install Tera Term – open source terminal emulator
115200 Baud Rate
8 bit Data
None Parity
1 bit Stop
None Flow Control
my board generates two serial ports when I plug it in
the higher number one works
Connecting to it in Tera Term, if you can type numbers/letters and they show up, the board is successfully moving data with the computer
Some uUSB cables don’t include data lines to cut costs. Watch out for that
Plug in a VGA Monitor
TF is this, 2000?
12345 serial inputs from PC through terminal should change color of VGA Screen
Looking for VGA stuff
Bought a VGA Cable and a VGA>HDMI Adapter
DID NOT WORK SAD
Monitor didn’t recognize it as an input
Download and Install the FPGA Tools and Drivers
Project 1 – Your First Go Board Project, Let’s Blink Some LEDs
Project 2 – The Look-Up Table (LUT)
Project 3 – The Flip-Flop (AKA Register)
Project 4 – Debounce A Switch
Project 5 – Seven Segment Display
Project 6 – How To Simulate Your FPGA Designs
Project 7 – UART Part 1: Receive Data From Computer
Project 8 – UART Part 2: Transmit Data To Computer
Project 9 – VGA Introduction (Driving Test Patterns to VGA Monitor)
Project 10 – PONG
Git & Github Bootcamp
Contents
1
Course Orientation
Intro
The best time to learn git is yesterday
Git is more than just some new syntax
“Living Git. Breathing Git. Second Nature. Fundamental Part of your Workflow”
Become one with Git
Pet chickens for variable names
Course Curriculum
Matrix of Topics
Intro to Git
Merging
Fetching & Pulling
Git Tags
Installation
Diffing
Github Odds & Ends
Git Behind The Scenes
Git Basics
Stashing
Collaborative Workflows
Reflogs
Committing In Detail
Undoing Changes
Rebasing
Custom Alises
Branching
Github Intro
Interactive Rebasing
???
Color Code
Git Core
Next Level Git
Github/Collab Core
Git: The Other Parts
Exercises
It’s hard to write practice exercises for git
Exercises at the end of each section
Accessing the Slides & Diagrams
There will be a “What Really Matters In This Section” video at the beginning of every section
It will have the slides attached and provide an overview
Nice touch
2
Introducing…Git!
What Really Matters In This Section
What Exactly Is Git?
Git is THE VCS
VCS – Version Control System
Software that tracks and manages changes to files over time
Revisit earlier versions of files
Compare changes between version
Undo Changes,
etc,
Other VCS – Subversion, Mercurial
Git has 88.4% market share.
Runner up is Subversion around 16.6
They stopped doing surveys it was so dominant
Visualizing Git
Git helps us
Track changes across multiple files
Compare versions of a project
Time Travel back to old versions
Revert to a previous version
Collaborate and Share changes
Combine Changes
Git is basically just the savepoint system for coding
Writers also use Git for version control
You can track versions and changes over time ofc
You can make forks and branches
But you can also merge/combine independent branches?
Seems like there could be dependency issues. If the branches are not totally independent changes of eachother they could conflict.
A Quick History of Git
Linux made Linux and Git
Git in 2005 after frustrated with shitty paid VCS
“Global Information Tracker” – on a good day
Who Uses Git?
Stackshare.io
Tech-Adjacent Roles use git too
Designers use git
Some govt’s have started using Git to draft laws
government.github.com
collaborative textbook writing
managing versions of novels, screenplays, etc.
daily diaries, composers of symphonies, drafting theses, etc.
Git Vs. Github: What’s the Difference?
Git runs on your computer
it runs locally. no cloud, no internet, no account
Github is a web service
It takes Git Repos and hosts them in a cloud
And makes them easy to collaborate with
You have to start with Git before you can move onto Github
3
Installation & Setup
What Really Matters In This Section
Installing Git: Terminal Vs. GUIs
Git is primarily a Terminal Tool
Git has several popular GUIs
Github Desktop
SourceTree
Tower
GitKraken
Ungit
List of GUI’s straight from Git site
https://git-scm.com/downloads/guis
The ability to fully manipulate git in a terminal is expected.
GUI’s are useful but use a lot of magic and obfuscate what’s happening behind the scenes. This can create problems down the line
For a skilled user, Terminal is faster
and there are things you can only do on a terminal
Commands are universal, so no investment in a particular wrapper
Course covers both side by side
WINDOWS Git Installation
Git was created for UNIX. Not Windows.
Windows don’t have UNIX by default
Command Prompt is the Windows CLI
CLI – Command Line Interface
BASH is the default shell for Linux and Mac
Git BASH is what we install
It emulates BASH on windows.
You can actually ignore the Git part and just use it as BASH
~/Dropbox/Root/TreeSheets/Lab/FPGA Bootcamp/Git
I can finally use LS and CD on windows
Install VS Code as the default text editor for Git BASH
Picked up a course on mastering VS Code as well
MinTTY
Verify you have git with
>
git –version
MAC Git Installation
Skip
Configuring Your Git Name & Email
you configure your name and email as a user profile, but there’s no account or anything
however
this will be what is listed as your name when you do contribute to a public repo
set your username/email
>
git config –global user.name “Tom Hanks”
git config –global user.email “tomhanks@gmail.com”
check your username
>
git config –user.name
already set to fishPointer and iantralmer@gmail.com
Installing GitKraken (Our GUI)
GitKraken time
Installed
Terminal Crash Course: Introduction
some bash stuff
not relevant to git itself
skippable
CD
RM
LS
PWD
this ones new to me
MKDIR
RMDIR
TOUCH <filename>
CLEAR
Terminal Crash Course: Navigation
Gonna watch these at 2x
mac has >open .
windows has >start
Open windows explorer at current directory
>
start .
Terminal Crash Course: Creating Files & Folders
touch creates new files
but it has a secondary use of updating the modified time of an existing file
bc i touched it
touch can make multiple folders at once. so can mkdir
try not to use _ underscores in folder names
Terminal Crash Course: Deleting Files & Folders
rm totally deletes the file
time for flags
rm -rf
the -r is for recursive
the -f is for force
so it forces a recursive delete on the target directory
this is how you delete an entire folder
you can instantly delete an entire folder of important files that may not be backed up
ls -a
-a makes it list all, including hidden stuff
4
The Very Basics of Git: Adding & Committing
What Really Matters In This Section
Most Essential Section in this course
What Is A Git Repo?
repo – repository
manually tell it in which directories to create repositories
a repo is a git workspace
Our First Commands: Git Init and Git Status
how to instantiate a new repo
git status
>
git status
if you run git status in a directory that does not have a repo, you will get a fatal error
there is no status, there is no repo
Initalize a repo inside the current directory
>
git init
Once you initialize the repo, you can run >git status and not get an error
The Mysterious .Git Folder
once you init, nothing changes.
Where is the “git” in this folder?
There is actually a hidden folder
You can see it with >ls -a
Git Documentation:
https://git-scm.com/doc
Reference Manual:
https://git-scm.com/docs
docs are thorough and arcane
rule about hidden folders and hidden files
they all start with .
ls -a reveals .git
the .git folder contains all of the git stuff. the version history and such
you can actually >rm -rf .git and delete the .git folder
if you do that and run git status after, it’ll return an error
because you deleted the thing that made it a repo
now you have to git init again to remake the repo
it’s hidden so you don’t screw with it. you can delete EVERYTHING
not just this one. ALL TIMELINES
the entire spiderverse
A Common Early Git Mistake
Git tracks a directory and all nested subdirectories
you can test this by initializing a repo in an empty folder
then mkdir a new folder
and then enter the child folder and run git status
you are still in that same repo
the repo is going to contain everything within the directory it was initialized in as though it were the root of all things.
YOU DO NOT WANT TO INIT A REPO INSIDE OF AN EXISTING REPOSITORY
git will git confused when git is asked to track gitself
you don’t want to make a repo in like, My Documents, or Desktop
It’ll end up tracking –everything– and that’s not really how people usually use git
The Committing Workflow Overview
commit time
bread and butter
Workflow
Working Directory
>git add
Staging Area
>git commit
Repository
a git commit is a checkpoint in the repo
it’s one of many
consider it your many savefiles
git isn’t a method of saving a files
it’s something you do after the files are saved
like a super-save or something like that
first, you change, create, delete files
then you “add” the changes made selectively for your commit.
so if you change 7 files but only 5 are ready, you can choose to only commit the 5 to the commit, the new savepoint
this is not a broad tool. it is tweezers of time
Staging Changes With Git Add
Workflow
Work on Stuff
Add Changes
Commit
once you’ve edited a file, if you run git status
git status will notice and call out the edited files that have been changed since last commit
but you still have to git add them
They are “untracked files”
Three Locations
Working Directory
the directory you’re actually working in, changing files, moving stuff around, etc.
Staging Area
this is the holding area for files that are soon to be committed
Repository
this is there all the commits exist.
as you make more and more commits with new snapshots of the files from the working directory, the repo will expand with more history
a commit is a savepoint. the repo is the save folder
when we make a commit, the contents of .git folder get changed
adding files to the staging area
>
git add file1.txt file2.txt
after adding files to the staging area you can run git status and see them in the “Changes to be committed:”
Finally, The Git Commit Command!
Before you run commit, you are expected to include a message that describes a summary of the changes included in that commit
name the savefile
how to write a good commit message?
running git commit will commit all staged changes
but it will also open the text editor you selected on install and prompt you for a commit message
if you forgot to change it from vim you will get trapped
just give git the commit message at the same time with the -m flag
>
git commit -m “commit message”
once you’ve committed it
git status will return and say
“nothing to commit, working tree clean”
everything you’ve done in the folder, it knows about, has tracked it, and can confirm it’s up to date
as soon as you change a file, the working tree is no longer clean
The Git Log Command (And More Committing)
Work on Stuff
Add Changes
Commit
There is a difference between existing files that have committed once before and have now been modified, and completely new files
git status will flag previously committed files that have been modified as such
git status will flag new files that do not exist in the repo under any commit as untracked
when you add these, and then git init
they will be flagged as “modified” and “new file”
find a log of all the commits for a repo
>
git log
>git log
$ git log
command
commit ed3c39d7bd34be1a23109ce194c33616400c969d (HEAD -> master)
commit hash, not important right now
Author: fishPointer <iantralmer@gmail.com>
username and email address, as configured earlier
Date: Wed Jul 5 13:03:01 2023 -0700
created two files
date and time and commit message
If you want to just add everything in the folder at once for a global commit. no need to be surgical. use git add .
global git add
>
git add .
Committing Exercise
just making files, editing them, committing, and repeating
5
Commits in Detail
What Really Matters In This Section
gitignore is critical
atomic commits, good commit messages, and navigating git docs
Navigating The Git Documentation
git commit has many many options and flags you can use
most git commands have a billion options like this
git docs do include examples
if you don’t want to use a reference and want a sequential coverage of git’s documentation, there’s also the Pro Git Book
try and stay sane reading these docs
Keeping Your Commits Atomic
atomic means to keep each commit focused on a single thing
keep your commits indivisible into smaller parts. just one change.
so if you make a new folder
and search and replace across four files
those things should be separate commits
the folder is one commit
the search/replace is a different commit
this is what it means to keep your commits atomic
!
When adding a directory, to add all the things within that directory and not just the directory itself
git add Directory/
make sure you include the slash at the end
Atomic commits makes it much much easier to rollback code
It also keeps the commit messages simple, since the changes they’re describing is simple
Commit Messages: Present Or Past Tense?
Official git documentation states to use Present Tense Imperative Mood
That is
Do This:
“Make xyzzy do frotz”
And Not This:
“This patch makes xyzzy do frotz”
“I changed xyzzy to do frotz”
Write the commit message as though you are giving orders to the codebase to change its behavior
But it’s a little unintuitive, so just do what your company says
Escaping VIM & Configuring Git’s Default Editor
you can change the default text editor Git is pointing to with a command
git config –global core.editor “code –wait”
there are other options like “vim” and “codium –wait”, Wordpad, etc.
These are included on the git docs for setup and config commands
Probably one for NPP too
There are COMMIT_EDITMSG files that’ll get opened if you don’t -m
You can include lots of info in there with #comments if you want.
You can also make the returned commit message really annoyingly long
Only in advanced and complicated projects will you need to write long commit messages
A Closer Look At The Git Log Command
when we git log, we sometimes want the commit hashes
we’ll use the hashes to revert to those commits
git log docs
crazy number of options for ordering, sorting, and filtering the commits listed in git log
you can git log –pretty in order to format the commit logs in a number of different ways, like for emails, or to fit on 80char terminals, etc.
git log –oneline
will output an abbreviated version of the commit hash, followed by the commit message, and nothing else. one line per commit. gorgeous
$ git log –oneline
31b1ed1 (HEAD -> master) add items needed to grow potatos
91915c2 add items needed for garden box
0e20858 add ingredients for tomato soup
even if your commit message is super long in full, the first line should still be an appropriately brief summary
in the case of –oneline, that’s all that gets shown anyway
Committing With A GUI
gitkraken can open several repos in different tabs like a browser
when you have a repo open, and some changes get made
a new node will appear on the timeline labeled WIP
and it’ll point out files have been changed. you can view them and start the staging process for a commit from there
it seems like it updates live too, since I touched to create a new file and it showed up right away on the GUI without any need to manually refresh
this is actually pretty awesome
keep in mind git log –oneline puts the most recent commits at the top of the list
the diagrams of the GUI are most useful for branching and merging
Fixing Mistakes With Amend
you can amend a commit if you forget to import a file
or to revise the commit mesage
example
git commit -m ‘some commit’
git add forgotten_file
git commit –amend
Core Command here is
>
git commit –amend
ONLY WORKS ON MOST RECENT COMMIT
Can’t go back like 10 commits.
The –amend flag will repalce the tip of the current branch by creating a new commit. It basically just redoes your last commit with the new data
after you do the bad commit
stage the files you need
then git commit –amend
this opens the text editor
from here you can edit the commit message file.
if you have no changes for the commit message file, you can just save and close to move forward
but notice that the newly staged forgotten_file will now be in the autogenerated commented description text
Ignoring Files w/ .gitignore
there are sometimes files and directories you want git to completely ignore
you can use a .gitignore
if you have like, API keys, or sensitive info, or credit card info, you obviously don’t want that stuff uploaded to github and publicly available for other people to download and work with
mac computers also generate fluff files you’re better off ignoring
if you have some code that logs output text, you can just ignore that since it’s going to get regenerated anyway
python dependencies and stuff should also be ignored
there could be thousands of libraries that really don’t need to be part of the repo
create a file called .gitignore
recall that’s a hidden file
three options for flagging files to be ignored
.DS_Store
will ignore files named .DS_Store
folderName/
adding the / at the end will ignore an entire directory
*.log
will ignore all files with .log extension
virtually every project on github will have a .gitignore
once you create the .gitignore file, and add some content to it to filter out other files in the repo
the repo will no longer flag the secret files as untracked in git status
but the repo will still flag .gitignore as untracked, since it is a new file
this is normal. you’ll have to commit the creation/changes to .gitignore just like any other file
There are useful tools like gitignore.io that can actually generate recommend .gitignore file contents depending on the environment you’re working in like Python, JS, etc.
6
Working With Branches
What Really Matters In This Section
conceptual understanding of branching
git head
git branch, switch, checkout
Introducing Branches
every commit has a hash
and every commit also references at least one Parent commit that came before it via its hash
except the initial commit ofc
say you have to tear apart the code to find a bug
but you’ve also been tasked with doing color scheme variations
and someone else has to add a new feature
and someone else is overhauling the UI
etc.
this is what branching was made for
for parallel works
without branching we’d be trapped in linear, serialized code changes
when atomized, it means that it’d be effectively impossible for multiple software developers to work simultaneously
The Master Branch (Or Is It Main?)
in git you are always on a branch
On branch master, nothing to commit
what you get from git status
you’ll also see the color coded “master” text
there is nothing special or unique about the master branch
many people treat the master branch as special
as the official branch or source of truth,
but that is a choice
from git’s perspective, it is not special
The master->main change is only on github
on git, they still use master
if you make an experimental branch and decide not to merge it back to your master branch, you can just let it sit there forever. no need to clean it up or anything
it’d be worse if you did, you lose info
(HEAD -> master)
What On Earth is HEAD?
(HEAD -> master)
The HEAD is a pointer that references the current Branch
When you switch from one branch to another, the HEAD is the thing that points to a different branch
So, if you make a new commit, it’ll go onto whatever branch the HEAD is pointing to
Each commit is uniquely identified by its hash
Each branch is a pointer that points to a specific commit
Two branches can be pointing to the same commit
In a case where you create a new branch but haven’t done anything else yet
Both branches exist, but no commits have been made to diverge them
In order to diverge them, a commit must be made after switching the HEAD
the HEAD will always point to the most recent commit on a given branch
it’s the tip of the branch or the head of the branch
You can also think of branches in terms of multiple people reading the same book
they all have their own bookmarks
when you open the book, it can only be opened to one page at a time
which bookmark do you pick to open to a particular page?
which branch do you pick to point your commits to? That is the info contained by HEAD
Viewing All branches With Git Branch
list of current branches
>
git branch
the currently active branch will be marked with a *
create a new branch
>
git branch <branch-name>
it makes a branch. do not include spaces in the name of the branch
this will only make the branch, it will not switch you to it
Creating & Switching Branches
if you create a new branch and have yet to create a commit to diverge it from the master branch
when you run git log, and the most recent commit is flagged as (HEAD -> master)
it will also list the second branch you created, since both branches are pointing to the same commit
(HEAD -> master, pbj)
Switch branches in git
>
git switch <branch-name>
Used to be checkout
what changed? not the same?
so once you switch to the other branch, and run git log
it’ll reference the active branch first, and any other branches currently referencing the same commit afterwards in the list
that is
(HEAD -> pbj, master)
After making a commit to diverge the branches, the HEAD will be pointing to pbj alone, as it now has a unique commit from the master branch
and the (master) will leave the HEAD list and show up further down the commit history on the most recent master commit
Since git log provides a chronological, serialized list of commits, it’ll flag the most recent commit in each branch that exists (according to the perspective of the active branch)
Time travel aspect:
if you git switch back to master
and run git log
It doesn’t know about the new pbj branch’s commit
Its timeline ends with it’s most recent commit
GIT LOG WILL RETURN DIFFERENT RESULTS BASED ON THE BRANCH
git log is a serialized list of commits that culminate in the most recent commit of the active branch
More Practice With Branching
The current location of the HEAD and the branch it is on when you create a new branch is important
Critically Important!!!
tech:
git commit -a -m “commit message” to just add and commit all unstaged changes
git log is starting to jam up my CLI. I don’t know how to fix it when that happens
so I’m just running git log –oneline instead
asked chatgpt, it’s q to exit
so if the head of a branch hasn’t moved since you created the new branch
then the head of that branch will be flagged in the new branch’s git log
but if you go back to the original branch and make a new commit, the head of that branch is no longer in the common history of the two branches, and so it won’t show up when you run git log on the new branch
IT DOES MATTER WHERE YOU BRANCH FROM
Switching Branches With Unstaged Changes?
the exact same functionality of git switch
>
git checkout <branch-name>
but it can do a lot more than just switch
It did too many things, so they simplified with switch
old docs will reference checkout
git checkout can do more than switch branches, it can restore working tree files too
git switch can create a new branch
>
git switch -c <branch-name>
-c flag lets you make a new branch and switch to it in one line
you can do the same thing with git checkout, but it takes -b for branch instead
>
git checkout -b <branch-name>
when you switch branches it will actually go into your folder, edit and delete and restore files to match what you’re expecting
so if you go into one branch and make a new file, that file will be deleted when you switch branches
but, it can only do that if it’s a tracked file that’s been committed onto a branch at least once
If you have unstaged changes on a particular branch and then try to switch to a different branch, it will warn you that the act of switching branches will overwrite and delete your uncommitted changes.
$ git switch pbj
error: Your local changes to the following files would be overwritten by checkout:
playlist.txt
Please commit your changes or stash them before you switch branches.
Aborting
so if you have to either stash or commit
how can you switch branches in order to reset your changes?
Deleting & Renaming Branches
create branch
>
git switch -c newbranch
delete branch
>
git switch -d newbranch
you cannot delete the branch you are on
-d will only work if the branch to be deleted has been fully merged into an “upstream” branch
-D is necessary for a force-delete
if you create a branch and immediately delete it, it’ll work because it’s technically merged (the master branch head and the new branch head are pointing to the same commit)
Renaming branches uses -m, which means move/rename
moniker? lol
rename a branch
>
git branch -m newname
in order to rename a branch, it must be your active branch
you don’t specify a target branch, just the new name
How Git Stores HEAD & Branches
optional video
just some behind the scenes
in the .git folder theres a file called HEAD
it will reference a file within the /refs folder
the refs/ contains a heads/ folder
the heads/ folder contains files for each branch
these branch files simply contain the hash for the most recent commit for each branch
Branching Exercise
easy stuff, already did more complicated work during the lectures
7
Merging Branches, Oh Boy!
What Really Matters In This Section
basically everything
especially resolving merge conflicts
only one command, merge, in this section
An Introduction To Merging
first, you merge branches, not commits
second, you merge into the current HEAD branch
that is, merge acts to merge the target INTO the current branch
so you should merge your features INTO master, by switching to master and then
how to merge a bugfix into master
>git switch master
>git merge bugfix
if merging a branch into master just involves “catching up” it’s called a fast forward merge
that is, if the master branch hasn’t seen any commits since the branch point for the secondary branch
it gets trickier when master has its own commits that bugfix branch doesn’t have
Performing A Fast Forward Merge
a fast forward merge is not a distinct command
it’s just a name we use for those conditions, when the master is catching up and there’s no work on master that could conflict with the branch absorbed
after a merge the branch does not go away
it still its own distinct context and distinct work can be done on it, and then merged again
at the moment of the merge, they contain the same info
or rather, each branch pointer is pointing to the same commit.
Visualizing Merges
gitkraken time
walked through the same example from the previous video, a simple fast forward merge, but with git kraken showing how the branch pointers point to the same commit after the merge
Generating Mege Commits
if both branches contain novel information, or conflicting information, there’s a chance git won’t be able to perform the merge automatically.
for example, if you both edit line 59 to be different things
when it’s not a ff merge and it’s not a conflict merge, but there are novel data from each branch
git will create a “merge commit”, so that there exists a commit that contains both sets of data from the two parents of the merge,
and that will be the commit that the master of the merge will now be pointing to
the secondary of the merge will remain where it is at, the branch pointer doesn’t move
it never did move, it just so happened that master and secondary started pointing to the same commit, but with the merge commit, there’s a new one for master to point at that secondary won’t be privy to
every commit has a parent
a merge commit has two parents
when you do perform a merge that generates a merge commit, you will have to provide a commit message like usual for it.
-m flag should suffice
that is,
>git merge branch2 -m ‘merge branch2’
the git return will discuss some “recursive strategy”
Oh No! Merge Conflicts!
when there’s a conflict,
git will tell you that it could not resolve the issues automatically
then, you will have to resolve it manually
it will create a modified version of the file that has both versions of the data, the one from the extant branch, and the one from the absorbed branch
in a format like this
HEAD<<<<<<<<<<< head content ========== branch1 content >>>>>>>>>branch1
Given the material from both, you can choose to keep one or the other, mix and match, or write something new to get them to cooperate.
Once you remove the conflict markers and save the document, you can add your changes and commit.
Resolving Merge Conflicts
when you delete a branch, it will warn you that all the changes contained within that branch haven’t been merged into master,
unless they have…
one technique for merging is to create a novel combo branch so that both parent branches can remain independent. just create a third branch for the merger
Using VSCode To Resolve Conflicts
just another merge example
Merging Exercise
doing this one
1. Fast Forward Merge
make a repo
create a fork branch
make updates on the fork branch without changing the master
switch back to the master
merge the fork branch into the master
this is a fast forward merge
2. Merge Commit – No Conflicts
make a new file on a new branch
make changes to the first file on the original branch
switch back to the original branch
merge the two, now the original has both files
no conflict merge, but not a ff
3. Conflict
8
Comparing Changes With Git Diff
Introducing The Git Diff Command
git diff helps us understand the differences between commits, files, branches, etc.
git diff, git log, and git status are all tools to help get a good picture of how a file or a repo has changed over time
like git log and status, it is informative and has no affect on the repo
git diff on its own lists all the changes in the working directory that are NOT staged for the next commit.
where git status will just tell you the files that have been modified,
git diff will actually print out a bunch of text lines, labeled with the line number ranges, of the changes you made,
and mark the removed lines with — flags
and mark the new content with ++ flags
and even color them red and green
the rest of the printout is just there for context.
A Guide To Reading Diffs
format is dense and highly syntaxed
you can diff between two versions of the same file
in the simplest case, between the working directory and the staging area
but you can also diff two different files
or two different branches, or two different commits, etc.
“diff –git a/rainbow.txt b/rainbow.txt”
if you git diff in a repo with multiple files that have been changed, it will list off a git diff for each file
the markers
— a/rainbow.txt
+++ b/rainbow.txt
the markers indicate which file the content came from
the code chunks are called chunks
they’re just there for context
the code chunk line number range things are broken down like this
@@ -3, 4 +3, 5 @@
notice the lack of comma after 4
what it’s saying is
from “-” which refers to file a
line 3
and then four lines after that
from “+” which refers to file b
line 3
and then five lines after that
this is called a CHUNK HEADER
Viewing Unstaged Changes
next up
git diff
git diff HEAD
git diff –staged
git diff –cached
git commit -am only works if the file exists on the previous commit
that is, it won’t work on the very first commit of the repo
Viewing Working Directory Changes
git diff HEAD
when we do git diff HEAD
it’ll show the changes between now and HEAD
HEAD being the last commit, it’ll show you all changes in the working tree since your last commit
the difference here is that
if you have uncommitted changes,
git diff HEAD will show the changes even if they’ve been staged using git add
but git diff will only show unstaged changes
git diff HEAD includes staged and unstaged changes
he used git diff HEAD on a new file that didn’t exist in the previous commit,
but mine didn’t do that
neither git diff nor git diff HEAD would detect it before staging
and then after staging, only git diff HEAD detected it
which conflicts with the rules above
Viewing Staged Changes
git diff –staged
git diff –cached
they do the same thing
they will show ONLY staged changes
git diff will only show unstaged changes
git diff –staged will only show staged changes
git diff HEAD will show both unstaged and staged changes
Diffing Specific Files
you can do like
git diff HEAD style/main.css
that way the git diff doesn’t list off every single file that has changes
and you can just view the changes on a single file
Comparing Changes Across Branches
git diff branch1..branch2
you like. actually put the double dot
then it’ll go through and compare all the files in each branch for you
and files that only exist in one branch will have everything in red, or green, as flagged per file A or B respectively
so it’s pretty straightforward
you don’t have to use the .. you can just use space but people are fans of .. for some reason
order matters, but it just flips the A and B file notations
Comparing Changes Across Commits
git diff commit1..commit2
since commits aren’t named you have to use the hash numbers
which is kind of a pain to copy paste in
example
$ git diff c083591..1a9a55b
Visualizing Diffs With GUIs
this is one of the areas where GUIs shine
git kraken will offer file view and diff view when you’re staging changes
you can also just ctrl+click two files and it’ll automatically offer a diff between them
or two commits
sometimes people call the code chunks, hunks
Diff Exercise
running git clone for this one
Note: DO NOT RUN GIT CLONE INSIDE A REPO
git clone creates a repo on your local using the link
which means if you do it in a repo you are making the rookie mistake of creating a repo within a repo
git clone https://github.com/Colt/git-diff-exercise
why is there a hidden branch
are they not on your machine until you switch to them???
completed exercise, was a good one
9
The Ins and Outs of Stashing
What Really Matters In This Section
some people just don’t use git stash
pretty optional
Why We Need Git Stash
since branches restructure the files and folder on your machine
if you make changes on a branch and then try to change the branch without committing them, there are two options
1. the changes go with you to the new branch
2. git detects a conflict and won’t let you switch
sometimes you need to switch to another branch before you’re ready to commit on the stuff you’re working on
so you stash it
in scenario one, if you switch back to the original branch and commit, the changes won’t exist on master
only one instance of the changes, and it carries with your HEAD
Stashing Basics: Git Stash & Pop
the command is
> git stash
or
> git stash save
it will take all uncommitted changes and stash them, and then revert the changes in your working copy so you can switch branches without conflict
seems really useful
> git stash pop
is what pulls it out of the stuff and puts everything back on the table
Practicing With Git Stash
Git Stash Apply
git stash apply
most people if they use stash at all will just stash and pop
no fancy stuff
>git stash apply
so after you’ve stashed some changes
you can switch branches and go somewhere else
but if you decide you want to pop out those stashed changes onto a branch other than the one you stashed them on
you can use git stash apply, and then it’ll act like a normal merge operation where you have to manually resolve conflicts, etc.
it also doesn’t remove them from your stash
pop pulls it out, applies it, and clears the stash out
git stash apply pulls out a new instance of it, and applies it while retaining the stash
Working With Multiple Stashes
you can just keep stashing stuff
over and over
>git stash list
to view all the stashed changes
not super practical
you can pop particular stashes in the stash by reference the stash by the stash id
stash@{2}
Dropping & Clearing The Stash
>git stash drop stash@{2}
this is how you just delete a stash entry
>git stash apply stash@{2}
to completely empty the stash
>git stash clear
Stashing Exercise
10
Undoing Changes & Time Traveling
11
Github: The Basics
12
Fetching & Pulling
13
14
15
16
17
18
19
20
Digital Electronics
Contents
1
Introduction
2
Logic Gates
3
Boolean Algebra and Reduction Techniques
4
Boolean Arithmetic
5
Combinational Circuits (LONG)
6
Flip Flops and Registers (LONG)
7
Sequential Circuits
8
Programmable Logic Devices
9
Analog to Digital and Digital to Analog Converters
10
Logic Families
11
Semiconductor Memories
12
Extra
13
Thank You Note
FPGA Bootcamp Master
Course List
Core Series
GO Board Tutorials
Digital Electronics
FPGA-1
FPGA-2
FPGA-3
FPGA-4
Nand2Tetris
Verilog HDL: VLSI Hardware Design
Verilog for an FPGA Engineer with Xilinx Vivado
SystemVerilog for Verification Part 1
SystemVerilog for Verification Part 2
Code Series
Git & Github Bootcamp
100 Days of Code: Python
Beginning C++ Programming
Microcontroller Embedded C Programming
Advanced C Programming
Electronics Intermission
Monty Choy Interview Questions
Complete Electronics Hardware Design Course
Crash Course Electronics and PCB Design
Peripheral Coding
Linux Administration
Linux Shell Scripting
MATLAB
Web Development Bootcamp