Conclusion
It’s been an adventure, ladies and gentlemen. From a starting point at ground zero, we now know how to perform all the basic Git repository tasks: cloning to the local machine, making commits, pushing to and pulling from the remote repository, and merging code from one branch onto another. We’ve also looked at more advanced tasks like rebasing unpublished branches and cherry-picking commits from one branch onto another in order to make urgent changes before the rest of the branch’s code is ready to be merged. In exploring the cherry-picking process, we also saw that Git is not infallible, and we followed that by touching briefly on how to intervene manually when Git cannot merge changes by itself.
One area of Git that I specifically did not touch on in the past few weeks was carrying out all of these tasks via the command line. Many in the industry would argue that, by choosing to avoid the command line, I have not taught you anything about how to use Git in a real-world situation. I made this choice for two reasons. First, the GitHub Desktop interface provides all of the major functionality of the Git command line in a more beginner-friendly package. While there are some tasks that are easier in the command line than in the desktop interface, the command line is also more particular – especially for a beginner, it is easy to accidentally issue a command that does something other than what you intended to do. The second reason is that, concurrently to this blog, I was working on a separate project that used Git at the command line with different account credentials than those I was using for this blog. Out of an abundance of caution, I did not want to risk changing my command-line configuration and accidentally using the wrong credentials for my other project.
Were this blog to continue, our next topic would be a continuation of the discussion on merge conflicts, explaining how to resolve such conflicts using the GitHub Desktop interface and Visual Studio Code. Information on that process can be found in this YouTube video. After that, we would have moved on to a basic primer on using Git at the command line. This PDF document contains a handy quick-reference guide for performing the most common Git tasks at the command line.
I hope this experience has been as useful for you as it has for me, and I wish you all the best on your next projects.
Comments
Post a Comment