I Got Git, But No Pi

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am starting out with Git. Let’s get started!

Previously…

Last week, I was all set to install Git on BlinkyPie, my Raspberry Pi 3B+, but it had some problems with accessing the apt store. I felt lucky getting away with barely fixing what I broke, but the cause remains unidentified.

Git

Disclaimer: this will not be a comprehensive tutorial starting out. There are plenty of those already. If you’re just starting out, I recommend a shorter tutorial. I viewed three videos ranging from 15 minutes to an hour (I still haven’t finished the hour long one) and found the information density roughly the same with longer tutorials covering features and configurations I’m guessing aren’t important for a single user first project. Focus on the main loop, then expand. For any one who missed my last post, GitHub is a site hosting the most well known and widely used Git server. I won’t be touching it today.

Every time I do any research about Git, it seems about ten times bigger then last I remembered. It’s free, it’s open source, and it’s even industry standard for tracking changes in a project (Version Control). I should have been using it ten years ago, but like pretty much any tool originally written with Unix or Linux in mind, its initial impressions when using it on Windows were that of an aquarium at a dog shelter; it’s been made to work, but it hardly looks like it belongs. I strongly recommend project or two in a Unix like environment to learn the command line if you want to become fluent in Git without relying on a graphical interface.

Git Server Installed, Not Configured

I have yet to see what is of BlinkyPie, but I was easily able to install Git server onto GoldenOakLibry, the Network Attached Storage (NAS), from repositories over the web interface. Had this been restricted, like what happened with my Bitwarden server, I would have proceeded with rigging a Pi to host while storing the data proper on the NAS.

Proper server side configuration will be a matter for another week. My goal was to have a test repository accessible from all my workstations. However, it appears I need to do such things as make a git user and set up credentials and user keys. I’m not prepared to do that this week.

A Simple Start

I know it doesn’t sound like much, but I have taken my first steps toward intuitively understanding Git. I made a directory and used git init to tell Git it is a repository. Git in turn made a hidden administrative directory called .git, which I don’t touch on pain of messing up the project history. I made a simple text file and walked myself through adding it, and committing it with some difficulty following on-screen instructions when it wanted a note about the commit.

The next step would have been to push it to a repository I’m at a loss for setting up. While writing, I went through the same steps again on GoldenOakLibry with no idea how I’m supposed to use a server except possibly using clone on all my client machines. I even went through the confusion that is vim terminal text editor, since nano wasn’t around and won’t be for the time being.

Takeaway

Git is big. Every programmer should learn it. Just don’t go learning both Git and the command line at the same time. I had trouble learning which was which way back when. And if you reasonably can, install Linux. All it takes is a small distribution on a thumb drive; an old computer is even better.

Final Question

Got Git yet?

Leave a Reply