12 Days of Gitmas: Your first Git project
Tags: beginners, git, github, tutorial
Published: 2019-12-15 18:59:48

*On the third day of Gitmas, my mentee asked of me...
__Git's ready - what then?__
[how do I get Git set up](https://dev.to/sushicodes/12-days-of-gitmas-setting-up-git-39i8),
[and could you explain Git, pretty please?](https://dev.to/sushicodes/12-days-of-Gitmas-intro-to-Git-4l26)*

Yesterday, we got Git installed on your computer.  Today's Day 3, where we'll be setting up a super simple Git project.

There are different ways to set up a Git project.  Today we're setting up a Git project locally, so you can track your own changes as you work.  Tomorrow, we'll talk about setting up a project using a service such as Github or BitBucket, so other people can work on your project with you.

All you have to do to initialize Git for your project is navigate into the top-level folder of your project in your terminal, and type 
`git init`

And voila - now you have a Git repository!

![Screenshot of initializing a git repository in iterm](https://live.staticflickr.com/65535/49223160578_190b1ce094_o.png "I just created a gitmas repository!")

*But... I still have so many questions.*

Questions are good!  (And if you have any questions I don't answer, even (especially!) if you think it's a silly question, please to ask them in the comments below!)  This Git series is aimed towards the absolute beginner programmer, so here are a few answers for the questions I can think of:


**What's a terminal?**

The terminal is an environment that runs in a program called a console on your computer, that allows you to run commands in the command line.

We discussed which terminal apps you can use in [yesterday's post](https://dev.to/sushicodes/12-days-of-gitmas-setting-up-git-39i8)!

![Screenshot of my iTerm2 terminal](https://live.staticflickr.com/65535/49223667636_5718b6f4e7_o.png "This is my terminal")


**Okay, then what's the command line?**

The command line is the interface that you interact with in the terminal.  That's a fancy way of saying that it's the place where you can type stuff when you open the program that runs your terminal.

![Screenshot of my terminal with an arrow pointing at the command line](https://live.staticflickr.com/65535/49223889907_49f9e0031d_o.png "The arrow points to the command line.  It's the one with the cursor")


**Where should I put my project?**

Anywhere you'd like!

*Um, that's not helpful*

Technically, you can initialize Git in any folder on your computer. 

In practice, however, many devs will have a specific folder that contains all their repositories.  Mine's called `repos`, and lives in my home (`~/`) directory.  Note that you're not going to want to initialize Git for your entire `repos` folder.  Rather, you should create a new subfolder for your new project (`mkdir project-name`), go into that folder (`cd project-name`), and then `git init` in there, so only the stuff in your project folder is tracked.

![Screenshot of initializing a git repository in iterm](https://live.staticflickr.com/65535/49223160578_190b1ce094_o.png "Yes, this is the same image as above.")

However, depending on your project, sometimes your folder *has* to be elsewhere (for example, I do a lot of voxel art for my game, [Bobber Bop](https://bifo.co/games/bobber-bop), and those have to go inside a folder within the [MagicaVoxel](https://ephtracy.github.io/) app).  That's 100% okay.  You can still navigate into your folder, wherever it is, and initialize Git there.


**What does it mean when you say you're doing something "locally"?**

"Local" means something that you can only view on your own computer.  If you create an `.html` file and open it in your browser, you're viewing it locally.

On the other hand, "remote" means on some sort of server where you could view it from other computers.

**Any other questions?  Let me know in the comments!**

If you have any questions about Git or requests for other topics you'd like to see me blog about, please leave a comment!  And if you're enjoying this series, consider supporting me on [Patreon](https://www.patreon.com/sushiday), following me on [Twitter](https://twitter.com/sushiday) or checking out my [Twitch](https://www.twitch.tv/sushicodes) [streams](https://www.twitch.tv/sushiday)!