Forgit - A utility tool to use git interactively
Tags: git, beginners, tutorial, productivity
Published: 2020-09-26 13:25:01

---
title: Forgit - A utility tool to use git interactively
published: true
tags: git, beginners, tutorial, productivity
canonical_url: https://gitbetter.substack.com/p/forgit-a-utility-tool-to-use-git
---
![](https://cdn.substack.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00748290-edc8-401b-852e-e760904d4976_940x788.png)

> #### This post was originally posted in the newsletter [GitBetter](https://gitbetter.substack.com/). If you are interested in leveling up your game in Git, you can subscribe to it.

**Forgit** is a lightweight CLI tool that helps you to use Git interactively. This tool is a very useful tool that helps you to work effectively.

You can view the repo **[here](https://github.com/wfxr/forgit)**[.](https://github.com/wfxr/forgit)

#### Installation

This tool uses **[`fzf`](https://github.com/junegunn/fzf)`. `**So don’t forget to download it.

To install fzf, follow **[`these instructions`](https://github.com/junegunn/fzf#installation)** for your respective platforms.

To install Forgit,

1. Download the source from the repo.

2. Open **.bashrc** or **.zshrc** and add **forgit.plugin.sh or forgit.plugin.zsh**.

3. **`source .bashrc`** or **`source .zshrc`**

#### Usage

Some of the useful commands in Forgit

#### git add

The default command is **ga**

![https://raw.githubusercontent.com/wfxr/i/master/forgit-ga.png](https://cdn.substack.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F733ab82e-df82-4341-99f7-7d728ec2f61b_2066x1294.png)

In the above image, you can see the interactive screen.

You can use **`arrow keys`** to navigate up and down.

Use **`Tab`** and **`Shift-Tab`** to add/remove the file.

#### git log

The default command is **glo**

![screenshot](https://cdn.substack.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F506128fa-2836-4c13-90ad-5b1e8ab533c3_2066x1294.png)

As the tool uses fzf, you can fuzzy search the logs.

#### git stash

The default command is **gss**

![](https://cdn.substack.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa35d7cf7-f533-4de4-aa4e-a2a6fdf22baa_810x462.png)

#### Change default alias

Forgit also gives the option to change the default aliases.

Just configure these variables in your shell and source it. Some of the common variables are:

```
forgit_log=glo

forgit_diff=gd

forgit_add=ga

forgit_stash_show=gss

forgit_cherry_pick=gcp
```

For the full list of options, you can see [this configuration](https://github.com/wfxr/forgit#--options) to change the aliases.

Forgit may take some time to fit in your workflow but it’s a very useful tool that comes in handy in many places.

Thank you for reading :)

> #### This post was originally posted in the newsletter [GitBetter](https://gitbetter.substack.com/). If you are interested in leveling up your game in Git, you can subscribe to it.