July 24, 2021

Git is an awesome tool for everybody that works with text. I know you were told that Git is a utility for — mostly — programmers, and that is true but if you are a writer Git can be useful too.

What is Git

First things first — what is Git? According to the official site:

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

To simplify, Git tracks changes to any text by comparing it to the previous "saves" (Snapshots). It allows you to safely try new things in your projects, without damaging the stable version of it, and then, at a later stage, merge those changes.

In this blogpost I will explain you the most basic Git functionalities — which are the most commonly used daily — and walk you through them.

I will create a simple text file — could be any type of text file (source code, text documents) — and show you how you can track changes, revert to previous stages, create new branches to try things out and merge those changes to the stable version.

Note: I am working on a Mac machine, so the terminal commands with be using [bash](<https://en.wikipedia.org/wiki/Bash_(Unix_shell)>). If you are on a Windows machine, you can open the PowerShell and use the same commands I am using.

Installing Git

If you don't have Git installed on your machine, you can follow the steps in the link below. If you have, you can skip to the next part Create a Repository .

Git - Installing Git

After installing Git, you must insert some initial configurations. These will be the name and e-mail of the person who will work in this repository on this machine.

Do it so with the following commands:

git config --global user.name "John Doe"

git config --global user.email [email protected]