<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/git-crash-course-introduction-setup-and-command-line-basics-atuovqgrw" -->

---
title: Git Crash Course: Introduction, Setup, and Command Line...
description: A beginner-friendly guide covering Git installation, configuration, and basic workflow. Explains how to set up Git on different operating systems, configure...
canonical: https://daily.dev/posts/git-crash-course-introduction-setup-and-command-line-basics-atuovqgrw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Git Crash Course: Introduction, Setup, and Command Line Basics | daily.dev
og:description: A beginner-friendly guide covering Git installation, configuration, and basic workflow. Explains how to set up Git on different operating systems, configure...
og:url: https://daily.dev/posts/git-crash-course-introduction-setup-and-command-line-basics-atuovqgrw
og:image: https://api.daily.dev/og/posts/aTuoVQGrw.png
og:image:alt: Git Crash Course: Introduction, Setup, and Command Line Basics
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Git Crash Course: Introduction, Setup, and Command Line Basics

**[Collections](https://daily.dev/sources/collections)** · 3 min read · 5 upvotes · 0 comments

## Summary

A beginner-friendly guide covering Git installation, configuration, and basic workflow. Explains how to set up Git on different operating systems, configure user details, initialize repositories, and make your first commit. Includes essential command line operations and best practices for commit messages and staging area usage.

## Content

# Introduction to Git and Setup

Git is an essential tool for modern software development, providing version control that helps developers track changes and collaborate effectively. This guide will walk you through the initial steps of setting up Git and preparing your development environment.

## Installation and Configuration

To start using Git, you'll need to install it on your system. Instructions vary based on your operating system:

- **Windows:** Download the executable from [git-scm.com](https://git-scm.com/).
- **MacOS:** Use Homebrew - `brew install git`.
- **Linux:** Install via your package manager, e.g., `sudo apt-get install git` for Debian-based systems.

Once installed, configure Git with your user details:

```bash
$ git config --global user.name "Your Name"
$ git config --global user.email "your.email@example.com"
```

Additionally, setting up Visual Studio Code enhances your workflow by integrating a powerful development environment.

# Basics of Command Line for Git

Effective Git usage relies heavily on command line proficiency. Familiarize yourself with the essential commands:

- `pwd`: Print Working Directory - shows your current directory.
- `ls`: List directory contents.
- `cd`: Change Directory - navigate through folders.
- `mkdir`/`rmdir`: Create or remove directories.
- `touch`/`rm`: Create or delete files.

Command line navigation and operations are fundamental skills that will greatly aid in using Git smoothly and effectively.

# Creating a New Git Repository

A Git repository is a container that tracks the history of your project. It efficiently stores changes by recording differences rather than full files. To initialize a Git repository, navigate to your project folder and execute:

```bash
$ git init
```

This command sets up a `.git` directory in your project, marking it as a repository. Initially, your files will appear as untracked, setting the stage for organizing them into tracked history.

# Making Your First Commit

Understanding Git's three-step workflow is crucial for managing changes:
- **Working Directory:** Where changes are made.
- **Staging Area:** Prepares changes for commit.
- **Repository (Commit History):** Permanent storage of changes.

Start by making changes to a file, then add it to the staging area:

```bash
$ git add <file-name>
```

To commit your staged changes with a message, use:

```bash
$ git commit -m "Your commit message"
```

Ideal commit messages are descriptive and focused, making it easier to track project history effectively. Utilize the `git log` command to view commit history.

## Best Practices

- Keep commits focused on a single aspect of your project.
- Write clear, concise commit messages.
- Use the staging area to selectively commit changes.

Following these practices will help maintain a clear project history, facilitating better collaboration and version tracking.

By mastering these Git basics, you set a solid foundation for efficient code management and collaboration, key skills in the software development landscape.

## Similar posts on daily.dev

- [Git & GitHub Crash Course for Beginners](https://daily.dev/posts/git-github-crash-course-for-beginners-7prhdmb8g) · freeCodeCamp · 31 upvotes · 0 comments

---

Tags: [#cli](https://daily.dev/tags/cli), [#devtools](https://daily.dev/tags/devtools), [#git](https://daily.dev/tags/git), [#version-control](https://daily.dev/tags/version-control), [#vscode](https://daily.dev/tags/vscode)

[View this post on daily.dev](https://daily.dev/posts/git-crash-course-introduction-setup-and-command-line-basics-atuovqgrw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Git Crash Course: Introduction, Setup, and Command Line Basics","url":"https://daily.dev/posts/git-crash-course-introduction-setup-and-command-line-basics-atuovqgrw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/git-crash-course-introduction-setup-and-command-line-basics-atuovqgrw"},"datePublished":"2025-09-16T08:33:22.598Z","dateModified":"2026-03-15T03:24:15.255Z","description":"A beginner-friendly guide covering Git installation, configuration, and basic workflow. Explains how to set up Git on different operating systems, configure...","image":"https://i.ytimg.com/vi/jYaAgmPeiqE/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/jYaAgmPeiqE/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Collections","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Collections","logo":"https://media.daily.dev/image/upload/s--fk_6ycEi--/f_auto,q_auto/v1780996001/logos/collections?_a=BAMAMiWQ0","url":"https://daily.dev/sources/collections"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/git-crash-course-introduction-setup-and-command-line-basics-atuovqgrw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"cli,devtools,git,version-control,vscode","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Collections","item":"https://daily.dev/sources/collections"},{"@type":"ListItem","position":3,"name":"Git Crash Course: Introduction, Setup, and Command Line Basics"}]}
```

