In the last two post in our Learning git series, we talked about why to use git and the basic pattern you’ll find yourself using most often. In this post we are going to walk through the steps needed to get git setup and functioning on both Windows and Chrome OS. It’s becoming easier and easier to do this, and hopefully this guide will get you on the right path.
First, we’re going to explore the options for installing git on the two different operating systems. The program lists that I’ve put together are by no means a comprehensive list. They are what I have or still do use, and are in no particular order.
On Windows you have a lot of options when it comes to git from command line to graphical user interface - it really depends on what you are looking for. Here’s a list of the git applications that I’ve used:
They all have pros and cons - I’ve yet to find the ‘perfect’ one. I suggest that you give them all a shot and see which one matches your style.
On Chrome OS you have options too, not as many as Windows, but it’s better a few than none. Your options also depend on if you are in developer mode or not as well. That being said, I’m going to split this section up based on that. Keep in mind in developer mode you can also use anything from the standard section
If you don’t want to put your machine in developer mode, and there are plenty of reasons not to, then these options are for you. You’ll need to have access to the Play Store Android apps - see my post on android apps on the ThinkPad to see how excited I was for this. Otherwise, you can use a Chrome app called Arc Welder to do this, but I’m not going to cover that here.
If you are looking for git only, I’d stick with MGit because it’s an easy to use interface, which is only git. Termux gives you a lot more options, but it is command line - just something to keep in mind.
If you’ve bit the bullet and put your machine in developer mode then you probably already know about Chromebrew and all the links below. I’ll post them below anyway for those looking for the information.
With the above programs you’ll get a command line interface, which is easily upgradeable and a low maintenance one. Keep in mind though putting your Chrome OS machine disables some security features, so do your homework before deciding to go down that path. I did on my ThinkPad Chromebook 13, but that was before the Android apps option was a viable alternative.
If your interested, you can read about my experience and thoughts on the ThinkPad 13 Chromebook after a year of usage.
Setting up git
Once you have git installed you’ll need to set it up on the global side. If you’re using a graphical user interface, then you’ll probably find everything in the options menu. If you’re using the command line, then you need to set the options there. Overall the biggest settings you’ll need to ensure you’ve set are the user name and email address, which you’ll be using.
Since it’s sometimes a pain to find the right information when you need it, here are the commands needed to get the user information setup on the command line.
git config --global user.name "Your Name Here"
git config --global user.email "[email protected]"
This really is the only global option that you need to set, and will be what is marked on all of your commits going forward. If you want to check that you’ve done it correctly then use the following:
git config --global user.name # Returns: Your Name Here
git config --global user.email # Returns: [email protected]
If you’ve made it this far then pat yourself on the back, because this is usually one of the biggest hurdles that anyone learning git faces - getting started. In the next post we’re going to explore initializing a repository so that we can start using git on a project. If you missed one of the articles, select it from the below series link.
Links to the other posts in the Learning git series
- Intro to git - Part 1
- The git cycle
- Setting up git
- Initializing git
- What's a remote in git
- git branches simply explained
- git Merges Demystified
- How to use git flow
- git stash and pop
Always follow the manufacturers instructions, this write up is simply the way that I do it, and it may or may not be the right way. Use your common sense when applying products to or altering your stuff and always wear the appropriate safety gear.