Me, a novice, learning to use Git

Posted by mekowalski on June 22, 2016

In the beginning, I learned about Git and I was confused with it!

When I began encountering Git it was from learning the basics in the lessons. To me they were commands written in order to create, save and upload your code onto Github. Yes this was correct but I simply thought, “This git command is an extension of Github.” Later I learned that git specifically manages and tracks the changes made for your files and projects. Now I didn’t grasp why this was a big concept at first but I soon began to understand why Git is important for developers in the real world of coding.

There are three parts to Git, I drew a simple chart in my Moleskin to remind me how to use Git efficiently and effectively. This is where I learned about Git Workflow.

Part one was the Working Directory. This is where I made changes, modified, added and deleted code for my projects. Originally I used Git commands not really understanding what I did with them. During this part of the Workflow I was updating information in my project’s code and imrpoving my projects to where I wanted it to be. I finally understood this was a beginning marker of coding a project but I did this without utilizing part two consistently.

Once I finished modifying my projects I was ready for part two: Staging. I noticed that I didn’t bring my changes up to date. I would conitnually make changes but I had no idea of what changes were made because I was not tracking my modifications. I only did the staging process only before the final part of Workflow. Now this seemed to be the easiest way but what if I wrote in a code in my project then tried a different code in substitution, didn’t like it and wanted to go back to my original code? I would have to keep writing different versions of code instead of going into my log to find the original code that worked. This happened to me many times and I grew frustrated, then I decided to make a good habit and stage my projects as I went along. I’m still new in this habit but I am getting the hang of it.

Finally, Repository. Here I knew this is where my projects were stored but I didn’t know this is where all versions of my projects were also kept. I thought it was a folder for holding final, finished projects but no. Repository keeps track of all versions of my projects. This meant I could be a time traveller, go back and forth from the past to current versions of a project and reminisce about the long hours spent on one version of my project.

HAPPY CODING, malind