Getting Started With Git for Windows

Posted on: November 13th, 2012

Onward in my series about switching from a Mac to a PC!

The work I do with Max Foundry requires I use GitHub to make changes to any of the plugins or themes we create. We find this is a simple way to keep track of changes and keep working versions separate from master versions.

Everything was great on my Mac because I had absent-mindedly set it all up about a year ago. Now that I’m on a PC, I needed to re-install everything. Open command prompt, cd to appropriate folder, “git init”, nothing. Derp, Git doesn’t come installed on anything.

No Git Here

I never installed Git, so of course a “git whatever” wasn’t going to work. So I downloaded Git, but it turned out to be the Git GUI. Git GUIs are fine if you’re super scared of the command prompt. I on the other hand, enjoy the feeling of satisfaction from acting like an old school computer dude.

To get started on Windows, you can follow this handy guide, or you can stay here and read a bit further.

Setting Up Git

To start, head to the homepage for Git for Windows. This is where you get to decide if you want to use Git Bash (command promptesque Git) or the Git GUI.

I chose the door on the right, msysGit, and went to the Google Code page. Download that sucker and get ready to get Gittin’.

After downloading, run the .exe file. A command prompt window will open up and things will start to happen. It’s okay, just go with it. If your computer asks you for permission to access anything via msysGit, click “okay” or “allow” or whatever. After it’s all done loading, you should have new programs, “Git Bash” and “Git GUI”. Git GUI is the graphical version (since it stands for graphical user interface).

Git for Windows - Git Bash

You should see YourUsername@ComputerName ~ with a $ down below. This just means that you are in your User directory under whatever Username you currently are logged in with. To be sure of this, you can type “ls” then hit <enter>. All of the directories and files will show up and you can figure out where you are. Use “cd path/to/file” to get to the folder you would like to clone a repo to and hang tight.

Now that you are in the desired location, you can go about your normal Git business “git clone RepoName” and you too can start using Git for Windows like a pro. This is a very basic guide, so if you’re getting huffy because this is all old news, tell me what you want to know and I’ll add another post.

Quick Tips

If you are trying to copy text from, say, a GitHub repo you’d like to clone, copy the text, go into Git Bash and hit Insert on your keyboard.

To switch between Volumes (so from C: to E:, K: or whatever other lettered drives you have) simply type “cd e:” to go to e: drive or “cd k:” for the k: drive.

Tags: , , , , ,

previous post: Wampserver Setup and Troubleshooting next post: Font-Face Not Working in Firefox